[quote:1p7w4xqk]Do I have to update my in code for all Browser to Remote Browser ?
[/quote:1p7w4xqk]
use this code.
[code:1p7w4xqk]URL server = new URL("http://127.0.0.1:4444/wd/hub");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName("firefox");
System.out.println("Connecting to " + server);
WebDriver driver = new RemoteWebDriver(server, capabilities);
driver.get("http://www.google.com");
driver.quit();
}
[/code:1p7w4xqk]
[quote:1p7w4xqk]2) How to SET Or Provide the path for IE or Chrome Driver[/quote:1p7w4xqk]
Actually the error message is slightly wrong. You don't have to set the system property, but the chromedriver executable needs to be available in the PATH on the remote machine (where the server is running).
If you want to specify the path as a property, you can do that when you launch the server, e.g.:
[code:1p7w4xqk]java -Dwebdriver.chrome.driver=/path/to/driver -jar selenium-server-standalone.jar
[/code:1p7w4xqk]
[code:1p7w4xqk]DesiredCapabilities capability = DesiredCapabilities.chrome();
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capability);
[/code:1p7w4xqk]
[quote:1p7w4xqk]3) Also I was wondering, upon invoking the Remote IP and Port does the URL will launch or it prompt the users to accept the incoming connection...
(Something like VNC).... Since we are running on remote, any privilages issues ?
[/quote:1p7w4xqk]
there can be some privilege issues.
Thanks,
Ashish, Could you please send me that .txt file, which are referring you in module for reference.
Thanks
Regards
J
Hi Ashish,
One thing i don't understand is, do i have to copy my source code to the remote machine entire ?
And set up the hub and node in the remote machine and run this ?
Thanks
Regards
J
Also I have Firefox profiler and Chrome Profile.. How can I have capabilities set along with Profiler ...
Kindly clarify.
Thanks
Regards
J
[quote="jabbarali.mirza@gmail.com":1z0pe4qd]Also I have Firefox profiler and Chrome Profile.. How can I have capabilities set along with Profiler ...
[/quote:1z0pe4qd]
File profileDirectory = new File("c://mach//lib//prof");
FirefoxProfile profile = new FirefoxProfile(profileDirectory);
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, profile);
driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capabilities);
[quote="jabbarali.mirza@gmail.com":n4h8599w]Thanks,
Ashish, Could you please send me that .txt file, which are referring you in module for reference.
Thanks
Regards
J[/quote:n4h8599w]
txt file is in selenium_pack.zip
[quote="jabbarali.mirza@gmail.com":2nro0kp8]Hi Ashish,
One thing i don't understand is, do i have to copy my source code to the remote machine entire ?
And set up the hub and node in the remote machine and run this ?
Thanks
Regards
J[/quote:2nro0kp8]
no need to copy source code to remote machine.
you just have to start nodes on remote machines.
Thanks Ashish,
When you say "start nodes on the remote machines", Only Nodes right ? No Hub needed to be register in the Remote Machine ?
and my understanding standing the hub is like this (After download/copying the jars and exe in the remote machine)
java -jar -Dwebdriver.ie.driver=c:\IEDriverServer.exe selenium-server-standalone-2.48.2.jar -role webdriver -hub http://localhost:4444/grid/register -port 5557 -browser browserName=iexplore maxInstances=1 -maxSession 1
localhost- Will be my hub ip and the port will be my port where IE Node is listening
and I have to issue this command in the machine right ? Pls clarify
Regards
J
yes only nodes needs to be started at the remote machine.
please watch the Grid module for more info.