Jump to content
Sign in to follow this  
svenjatzu

WebDriver script

Recommended Posts

hey hi

someone please can help me translate my code to be valid for udf webriver?

 

#RequireAdmin
Opt("WinTitleMatchMode",2)
;~ Sleep(10000)
ShellExecute("C:\neu\1.lnk")


;~ Sleep(3000)
;~ $PID = ShellExecute("C:\freeneu\tab.exe")
;~ Sleep(30000*5)

WinWait("Example Domain - Iron","")
Global $sWinTitle = "Example Domain - Iron"
Global $avWinList = WinList($sWinTitle)

While $avWinList[0][0] < 1
    Sleep(250); Wait for new process to create its GUI
    $avWinList = WinList($sWinTitle)
WEnd


For $n = 1 To $avWinList[0][0]
    WinActivate($avWinList[$n][1])
    WinMove($avWinList[$n][1], "", 0, 0, 230, 440)
 Next

Opt("WinTitleMatchMode",1)
WinWait("Iron")
Sleep(5333)
WinWait("Iron")

Opt("WinTitleMatchMode",2)
WinWaitActive("m:")
WinWait("m:")
WinClose("m:")
;~ Sleep(5000)


Sleep(1000)
;~ ProcessClose("tab.exe")
ShellExecute(@ScriptDir & "\q2.exe")

 

Share this post


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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Hermes
      Hi, I have a site that has the following elements below: 
      <div>More element here</div> <div>More element here</div> <div>More element here</div> When I do this in Auto It:
      Local $oSelectDiv = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "div") _WD_HighlightElement($sSession, $oSelectDiv, 1) I also tried to add [3], but it doesnt seems to work:
      Local $oSelectDiv = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, "div[3]") _WD_HighlightElement($sSession, $oSelectDiv, 1) It always highlight the first one, but I am trying to highlight the 3rd in the list. Is there anyway to select the 3rd div without having to add any class/id in the divs, and without using XPATH? The structure of the elements in that site were built that way.
    • By ReM
      Hallo Experts,
      Your testsite and the examples are very good. Thanks a lot.  
      I used your example with Chromewebdriver. The Chrome Browser open, the site will shown, but all other functions not executed.
      The Chomedriver.exe Windows shows this text:
      Starting ChromeDriver 90.0.4430.24 (4c6d850f087da467d926e8eddb76550aed655991-refs/branch-heads/4430@{#429}) on port 9515 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. DevTools listening on ws://127.0.0.1:54044/devtools/browser/3c17aefd-a104-43e7-8c17-318963cda872 [12848:3100:0501/153128.889:ERROR:device_event_log_impl.cc(214)] [15:31:28.888] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: Ein an das System angeschlossenes Gerõt funktioniert nicht. (0x1F) [12848:3100:0501/153128.896:ERROR:device_event_log_impl.cc(214)] [15:31:28.896] USB: usb_device_handle_win.cc:1054 Failed to read descriptor from node connection: Ein an das System angeschlossenes Gerõt funktioniert nicht. (0x1F) The Error :  A devise connected to the systen does not work (0x1F)
      Win 10
      Chrome & Driver 90
      What i do wrong. Can you help me?
      Reiner
       
       
    • By Danp2
      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
      JSON UDF https://www.autoitscript.com/forum/topic/148114-a-non-strict-json-udf-jsmn
      WinHTTP UDF https://www.autoitscript.com/forum/topic/84133-winhttp-functions/
      HtmlTable2Array UDF (optional) https://www.autoitscript.com/forum/topic/167679-read-data-from-html-tables-from-raw-html-source/
      WebDriver for desired browser
      Chrome WebDriver https://sites.google.com/a/chromium.org/chromedriver/downloads FireFox WebDriver https://github.com/mozilla/geckodriver/releases Edge WebDriver https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ 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/
       
    • By TheOne23
      Hi Danp2,
       
      May I seek your a help and assistance why the page to download the chrome driver version 89 is not accessible.
      Getting below error page:

       
      Thanks in advance.
      TheOne23
×
×
  • Create New...