Jump to content

WebDriver UDF (W3C compliant version) - 07/29/2022


Recommended Posts

Introduction

This UDF will allow you to interact with any browser that supports the W3C WebDriver specifications. Supporting multiple browsers via the same code base is now possible with just a few configuration settings.

Requirements

Source Code

You will always be able to find the latest version in the GitHub Repo 

Help / Support

See the wiki for details on the UDF --

https://www.autoitscript.com/wiki/WebDriver

Please post any questions, suggestions or errors in the GH&S thread.

https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/

Previous support threads (Closed)

https://www.autoitscript.com/forum/topic/192730-webdriver-udf-help-support/
https://www.autoitscript.com/forum/topic/201106-webdriver-udf-help-support-ii/

Edited by Melba23
code removal
Link to post
Share on other sites
  • Replies 993
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

My complete results:

_WDStartup: OS: WIN_7 WIN32_NT 7601 Service Pack 1
_WDStartup: AutoIt: 3.3.14.2
_WDStartup: WD.au3: 0.1.0.1b-1
_WDStartup: Driver: chromedriver.exe
_WDStartup: Params: --log-path=D:\New folder\New folder\auto4 V1.651\chrome.log
_WDStartup: Port:   9515
__WD_Post: URL=HTTP://127.0.0.1:9515/session; $sData={"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true }}}}

 

Link to post
Share on other sites
11 minutes ago, Danp2 said:

Now, how about Chrome? What version and is it installed in the default location?

@NguyenLe Please answer the bolded portion of my earlier question. If Chome isn't installed in the default location, then ChromeDriver can't locate it in order to launch it. This can be addressed, but you then have to indicate this location to the ChromeDriver.

Also, check the chrome.log file located in the script directory to see if it gives any additional information that may help with this issue.

Link to post
Share on other sites

Here's a helper function for creating a new tab and optionally switching to it --

Func _WD_NewTab($sSession, $lSwitch = True)
    _WDExecuteScript($sSession, 'window.open()', '{}')

    Local $aHandles = _WDWindow($sSession, 'handles', '')

    If $lSwitch Then
        _WDWindow($sSession, 'Switch', '{"handle":"' & $aHandles[UBound($aHandles) - 1] & '"}')
    EndIf
EndFunc

 

Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...