List of usage examples for org.openqa.selenium.remote RemoteWebDriver RemoteWebDriver
public RemoteWebDriver(URL remoteAddress, Capabilities capabilities)
From source file:CalculatorTest.java
License:Open Source License
@BeforeClass public static void setup() { try {/*from www .j a v a 2 s .c om*/ DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"); capabilities.setCapability("platformName", "Windows"); capabilities.setCapability("deviceName", "WindowsPC"); CalculatorSession = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); CalculatorSession.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); CalculatorSession.findElementByXPath("//Button[starts-with(@Name, \"Menu\")]").click(); CalculatorSession.findElementByXPath("//ListItem[@Name=\"Standard Calculator\"]").click(); CalculatorSession.findElementByName("Clear").click(); CalculatorSession.findElementByName("Seven").click(); CalculatorResult = CalculatorSession.findElementByName("Display is 7 "); Assert.assertNotNull(CalculatorResult); } catch (Exception e) { e.printStackTrace(); } finally { } }
From source file:WebTestSelenium5.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.WINDOWS); capabilities.setCapability("name", "Testing Selenium 2"); try {/* w w w . jav a2 s .c o m*/ this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://web.mit.edu/"); }
From source file:AddLicenseSeleniumTest.java
@Before public void setUp() throws Exception { if (host != null && host.equals("localhost")) { baseUrl = "http://localhost:8080/"; driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); } else {/* w w w. j av a 2 s .c o m*/ baseUrl = "http://license-management.herokuapp.com/"; DesiredCapabilities caps = DesiredCapabilities.chrome(); caps.setCapability("platform", "Linux"); caps.setCapability("version", "42.0"); driver = new RemoteWebDriver(new URL(URL), caps); } }
From source file:WebTestSelenium10.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.WINDOWS); capabilities.setCapability("name", "Testing Selenium 2"); try {/* w ww. j av a 2 s . c om*/ this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://www.minnesota.edu/"); }
From source file:WebTestSelenium11.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.WINDOWS); capabilities.setCapability("name", "Testing Selenium 2"); try {// ww w .j a v a2 s .com this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://www.columbia.edu/"); }
From source file:WebTestSelenium1.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.WINDOWS); capabilities.setCapability("name", "Testing Selenium 2"); try {//from www. j ava 2 s.com this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://www.newhaven.edu/"); }
From source file:WebTestSelenium6.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.WINDOWS); capabilities.setCapability("name", "Testing Selenium 2"); try {/* w w w. jav a 2 s . co m*/ this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://www.cornell.edu/"); }
From source file:WebTestSelenium2.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.WINDOWS); capabilities.setCapability("name", "Testing Selenium 2"); try {/* ww w .j a va2 s . c o m*/ this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://www.caltech.edu/"); }
From source file:WebTestSelenium8.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.MAC); capabilities.setCapability("name", "Testing Selenium 2"); try {// w w w. ja v a 2 s.com this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://www.yale.edu"); }
From source file:WebTestSelenium7.java
public void setUp() throws Exception { DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("version", "11"); capabilities.setCapability("platform", Platform.WINDOWS); capabilities.setCapability("name", "Testing Selenium 2"); try {//from w w w . jav a 2 s .com this.driver = new RemoteWebDriver(new URL(URL), capabilities); driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); } catch (Exception ex) { System.out.println("Driver problem"); } this.driver.get("http://www.cam.ac.uk/"); }