Mugaro Posted May 1, 2024 Posted May 1, 2024 Hello all, ย I have a script and we have a function: Func BrowserControlFocus() ; Set focus on the Browser control - write which page is being tested and the location of the file. ; Output the name and location of the html page being tested. sleep(5000) $hWnd=WinGetHandle("[CLASS:Internet Explorer_Server; INSTANCE:1]") $oIE = _IEAttach($hWnd,"embedded") _IELoadWait($oIE) WriteToFile($outputFile,"The displayed page is the: " &_IEPropertyGet($oIE, "title") & " page") WriteToFile($outputFile,"File Location is: " & _IEPropertyGet($oIE, "locationurl")) EndFunc ย The embedded windows application that runs has switched to chrome instead. Does anyone know how to find a replacement function?
Mugaro Posted May 1, 2024 Author Posted May 1, 2024 From what I can tell, potentially the IE functions associated toย https://www.autoitscript.com/autoit3/docs/libfunctions/IE Management.htm ย Potentially this can be used in replacement? https://www.autoitscript.com/wiki/WebDriver
SOLVE-SMART Posted May 1, 2024 Posted May 1, 2024 (edited) Hi @Mugaro, yes the AutoIt WebDriver project "au3WebDriver", is the corresponding Chrome, Firefox, MSEdge etc. equivalent of the older _IE* approach (and their functions). You already referenced the wiki which is great ๐ . See also this post for a better understanding of how to start. The function to get the title and the url is _WD_Action() and it could look like this (to follow your structure above): WriteToFile($outputFile,"The displayed page is the: " & _WD_Action($sSession, 'title') & " page") WriteToFile($outputFile,"File Location is: " & _WD_Action($sSession, 'url')) Best regards Sven Edited May 1, 2024 by SOLVE-SMART ==> AutoIt related: ๐ย Organization AutoIt Community,ย ๐ GitHub, ๐ Discord Server, ๐ย Cheat Sheet,ย ๐ย autoit-webdriver-boilerplate Spoiler ๐ย Au3Forums ๐ฒ AutoIt (en) Cheat Sheet ๐ AutoIt limits/defaults ๐ Code Katas: [...] (comming soon) ๐ญ Collection of GitHub users with AutoIt projects ๐ย False-Positives ๐ฎย Me on GitHub ๐ฌย Opinion about new forum sub category ๐ย UDF wiki list โย VSCode-AutoItSnippets ๐ย WebDriver FAQs ๐จโ๐ซย WebDriver Tutorial (coming soon)
SOLVE-SMART Posted May 10, 2024 Posted May 10, 2024 Hi folks ๐ , please consider to take part on the WebDriver poll which is regarding which driver do you automate. Please have a quick look here and take part ==> this could help us to improve or harden the WebDriver project in the future ๐ . Thanks, best regards Sven @Mugaro ==> AutoIt related: ๐ย Organization AutoIt Community,ย ๐ GitHub, ๐ Discord Server, ๐ย Cheat Sheet,ย ๐ย autoit-webdriver-boilerplate Spoiler ๐ย Au3Forums ๐ฒ AutoIt (en) Cheat Sheet ๐ AutoIt limits/defaults ๐ Code Katas: [...] (comming soon) ๐ญ Collection of GitHub users with AutoIt projects ๐ย False-Positives ๐ฎย Me on GitHub ๐ฌย Opinion about new forum sub category ๐ย UDF wiki list โย VSCode-AutoItSnippets ๐ย WebDriver FAQs ๐จโ๐ซย WebDriver Tutorial (coming soon)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now