0

I'm launched Selenium Grid (Node and Hub),and testing Web app. But I need provide some action on Windows Open dialog. Can I do that with and how using AutoIt on next way : capabilities.setCapability("browser", "AutoIt") ?

3
  • Are you using AutoItDriverServer? You need to add what you tried so far. Commented Jul 10, 2018 at 10:51
  • Now I using Selenium Grid (Hub and Node) from Web Driver (ChromeOptions options = new ChromeOptions(); capabilities.setBrowserName(BrowserType.CHROME); capabilities.setCapability(ChromeOptions.CAPABILITY, options);). But I don't know how I can instantiate and run AutoItDriverServer. Do you know some helpful link for this topic? Commented Jul 10, 2018 at 12:28
  • How I can install and run AutoItDriverServer ? Commented Jul 24, 2018 at 10:08

1 Answer 1

1

Refer this link for step by step guide on how to use AutoIT with Selenium. This involves using the tool to create a .au3 script which you will need to execute from your code. But from your question, if you want something like capabilities.setCapability("browser", "AutoIt"), you have to use AutoItDriverServer (See README for installation steps).

Its a Selenium like Interface wrapper for AutoIt, so you can basically operate your windows application by the very same selenium methods you are familiar with.

How to Use it:

In the 'autoitdriverserver_python' directory, run the "server.py" file. Now, whenever you want to perform actions on your windows application, just create a new remote driver with capability of 'browserName':'AutoIt'. Ex-

driver = webdriver.Remote( command_executor='http://127.0.0.1:4723/wd/hub', desired_capabilities={'browserName':'AutoIt'})
driver.get("path to your application")
driver.switch_to_window("window name")
driver.find_element_by_id("your id").click()

Note as mentioned in docs:

AutoIt doesn't find or handle multiple elements specified by location strategy, therefore, finding elements in WebDriver is not implemented for AutoItDriverServer. You can only find singular elements.

See this link for all the available commands. To locate elements, for example through ID, you need AutoIT info tool which is available in the entire package.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.