Page tree
Skip to end of metadata
Go to start of metadata


  • AutoIt scripts work on windows only.
  • Works with AutoIt3 only.

Selenium Agent is able to run native scripts with AutoIt. To run a native script use the command:

driver.executeScript("seetest:client.runAutomationScript("Your script")", [TIMEOUT_IN_MSEC]);

Please note

  • Every line in the script should end with a "\n" character.
  • Strings passed in the script should be in ' and not ".
  • Timeout is the time frame in which the script should be done, default is 20 seconds.

The script will run on Selenium Agent's machine and will throw an error if the script fails or hit a timeout of 20 seconds.

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;


public class PerformanceTransaction {
    private RemoteWebDriver driver;

    public void setUp() {
        DesiredCapabilities dc = new DesiredCapabilities();
        URL url = null;
        try {
            url = new URL("<Cloud URL>");
        } catch (MalformedURLException e) {
        dc.setCapability("username", "<username>");
        dc.setCapability("password", "<password>");
        dc.setCapability("platformName", CapabiltyType.WINDOWS);
        driver = new RemoteWebDriver(url, dc);

    public void automationScriptTest() {
        String ret = (String) driver.executeScript("seetest:client.runAutomationScript("
                        + "WinWaitActive('Windows Security')\n"
                        + "Send('[USER]')\n"
                        + "Send('[PASS]')\n"
                        + "Send('[ENTER]')"
                        + ")", 20000);


    public void tearDown() {

  • No labels