sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #57310
Re: [Question #697889]: How to initiate remote webdriver using selenium commands in sikuli
Question #697889 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/697889
ramakrishna gave more information on the question:
I want similar script in Sikuli based. I was facing issue to initiate
Remote webdriver.
This is sample script based on Java-Selenium:
package toolSelection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
public class Lambda_HI_SingleExecution {
public static void main(String[] args) throws MalformedURLException, InterruptedException {
String username = "ramakrishna";
String accesskey = "901Et9naZQEaocqqgXeIQzk0iEMB9R1i";
RemoteWebDriver driver = null;
String gridURL = "@hub.lambdatest.com/wd/hub";
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("tunnel", true);
capabilities.setCapability("browserName", "chrome");
capabilities.setCapability("version", "70.0");
capabilities.setCapability("platform", "win10"); // If this cap isn't specified, it will just get the any available one
capabilities.setCapability("build", "LambdaTestSampleApp");
capabilities.setCapability("name", "LambdaTestJavaSample");
driver = new RemoteWebDriver(new URL("https://" + username + ":" + accesskey + gridURL), capabilities);
driver.get("http://localhost:8085/hi-ee");
Thread.sleep(5000);
driver.findElement(By.id("user-name")).sendKeys("hiadmin");
driver.findElement(By.id("user-password")).sendKeys("hiadmin");
driver.findElement(By.id("login")).click();
Thread.sleep(10000);
System.out.println("Login happened");
}
}
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.