← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #270331]: How to use Remote webdriver with SikULI and scripts are running on the node

 

Question #270331 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270331

    Status: Open => Answered

masuo proposed the following answer:
It is an example to open a browser on a different machine .

[Environment:]
SikuliX1.1.0 in machineA(192.168.0.1)
Internet Explorer in machineB(192.168.0.2)
IEDriverServer.exe in machineB
selenium-server-standalone-2.47.1.jar is in the both of the machine. 

[Specification:]
(1)Open Internet Explorer
(2)Wait 20 seconds
(3)Close Internet Explorer

[Script:]
load("C:\selenium\selenium-server-standalone-2.47.1.jar")
import java.net
import org.openqa.selenium.ie.InternetExplorerDriver as IEDriver
import org.openqa.selenium.By as By
import org.openqa.selenium.remote as REMOTE
serverUrl = java.net.URL("http://192.168.0.2:4444/wd/hub";)
ca = REMOTE.DesiredCapabilities()
ca.setBrowserName("internet explorer")

targetUrl = "http://www.sikuli.org/";
ca.setCapability(IEDriver.INITIAL_BROWSER_URL,targetUrl)    
remoteWD = REMOTE.RemoteWebDriver(serverUrl,ca)

wait(20)
remoteWD.quit()

[[Preparation:]]
Before you run the script, you should run selenium-server.
java -jar "C:\selenium\selenium-server-standalone-2.47.1.jar" -Dwebdriver.ie.driver="C:\selenium\IEDriverServer.exe"

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.