org.openqa.selenium.html5.Location Java Examples
The following examples show how to use
org.openqa.selenium.html5.Location.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Edition043_iOS_Permissions.java From appiumpro with Apache License 2.0 | 6 votes |
@Test public void testLocationPermissions() { // first, set the geolocation to something arbitrary double newLat = 49.2827, newLong = 123.1207; driver.setLocation(new Location(newLat, newLong, 0)); // now navigate to the location demo wait.until(ExpectedConditions.presenceOfElementLocated(geolocation)).click(); // if permissions were set correctly, we should get no popup and instead be // able to read the latitude and longitude that were previously set By newLatEl = MobileBy.AccessibilityId("Latitude: " + newLat); By newLongEl = MobileBy.AccessibilityId("Longitude: " + newLong); wait.until(ExpectedConditions.presenceOfElementLocated(newLatEl)); wait.until(ExpectedConditions.presenceOfElementLocated(newLongEl)); }
Example #2
Source File: RemoteLocationContext.java From selenium with Apache License 2.0 | 5 votes |
@Override public Location location() { @SuppressWarnings("unchecked") Map<String, Number> result = (Map<String, Number>) executeMethod.execute( DriverCommand.GET_LOCATION, null); if (result == null) { return null; } return new Location(castToDouble(result.get("latitude")), castToDouble(result.get("longitude")), castToDouble(result.get("altitude"))); }
Example #3
Source File: IOSDriverTest.java From java-client with Apache License 2.0 | 5 votes |
@Ignore @Test public void geolocationTest() { Location location = new Location(45, 45, 100); try { driver.setLocation(location); } catch (Exception e) { fail("Not able to set location"); } }
Example #4
Source File: OperaDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public Location location() { return locationContext.location(); }
Example #5
Source File: GetLocationContext.java From selenium with Apache License 2.0 | 4 votes |
@Override public Location call() { return Utils.getLocationContext(getUnwrappedDriver()).location(); }
Example #6
Source File: TestEdgeDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location location) { locationContext.setLocation(location); }
Example #7
Source File: TestEdgeDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public Location location() { return locationContext.location(); }
Example #8
Source File: TestEdgeHtmlDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location location) { locationContext.setLocation(location); }
Example #9
Source File: TestEdgeHtmlDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public Location location() { return locationContext.location(); }
Example #10
Source File: RemoteLocationContext.java From selenium with Apache License 2.0 | 4 votes |
@Override public void setLocation (Location location) { Map<String, Location> args = ImmutableMap.of("location", location); executeMethod.execute(DriverCommand.SET_LOCATION, args); }
Example #11
Source File: ChromiumDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location location) { locationContext.setLocation(location); }
Example #12
Source File: ChromiumDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public Location location() { return locationContext.location(); }
Example #13
Source File: OperaDriver.java From selenium with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location location) { locationContext.setLocation(location); }
Example #14
Source File: AndroidDriverTest.java From java-client with Apache License 2.0 | 4 votes |
@Test public void geolocationTest() { Location location = new Location(45, 45, 100); driver.setLocation(location); }
Example #15
Source File: AppiumDriver.java From java-client with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location location) { locationContext.setLocation(location); }
Example #16
Source File: AppiumDriver.java From java-client with Apache License 2.0 | 4 votes |
@Override public Location location() { return locationContext.location(); }
Example #17
Source File: WebDriverWrapper.java From bobcat with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location arg0) { ((LocationContext) super.getWrappedDriver()).setLocation(arg0); }
Example #18
Source File: WebDriverWrapper.java From bobcat with Apache License 2.0 | 4 votes |
@Override public Location location() { return ((LocationContext) super.getWrappedDriver()).location(); }
Example #19
Source File: IOSDevice.java From functional-tests-core with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location location) { this.client.driver.setLocation(location); }
Example #20
Source File: AndroidDevice.java From functional-tests-core with Apache License 2.0 | 4 votes |
@Override public void setLocation(Location location) { (this.client.driver).setLocation(location); }
Example #21
Source File: IDevice.java From functional-tests-core with Apache License 2.0 | 2 votes |
/** * TODO(): Add docs. * * @param location */ void setLocation(Location location);
Example #22
Source File: Device.java From functional-tests-core with Apache License 2.0 | 2 votes |
/** * Set geo location. * * @param location Geo location. */ public void setLocation(Location location) { this.device.setLocation(location); }