Jump to content

Recommended Posts

Posted

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?

Posted (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 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)

  • 2 weeks later...
Posted

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)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...