How to use Remote webdriver with SikULI and scripts are running on the node

Asked by haibharath

Dear All,

    Here is my problem
  Currently I am having two machines
   1.Hub/Master where I am running selenium scripts.This machine is WINDOWS.
   2.Node/slave where my test cases are running.This is a LINUX machine.In this machine all operations will get executed like opening firefox browser and ...

      Now the problem is that the web applications are running fine on LINUX machine where as DESKTOP testing is not at all working.The image location which I gave in my script is expecting the path in Hub/master(WINDOWS) machine not is LINUX machine.

  Please let me know how can run the SikULI on remote machine by using selenium remote webdriver.

If any sample code exist please share.

Thanks,
Bharath

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
masuo (masuo-ohara) said :
#1

In case of running sikuli on Windows machine and running browser on Linux machine, I would use remote desktop client software for Linux on Windows machine.Because sikuli can find image in a screen on own machine.
If you want to run browser on Linux machine, you should run sikuli on Linux machine, I think.

Revision history for this message
masuo (masuo-ohara) said :
#2

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"

Can you help with this problem?

Provide an answer of your own, or ask haibharath for more information if necessary.

To post a message you must log in.