Search in sources :

Example 36 with Location

use of com.google.api.ads.admanager.axis.v202205.Location in project selenium-webdriver-java by bonigarcia.

the class LocationContextJUnit4Test method testLocationContext.

@Test
public void testLocationContext() {
    LocationContext location = (LocationContext) driver;
    location.setLocation(new Location(27.5916, 86.5640, 8850));
    driver.get("https://bonigarcia.dev/selenium-webdriver-java/geolocation.html");
    driver.findElement(By.id("get-coordinates")).click();
    WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
    WebElement coordinates = driver.findElement(By.id("coordinates"));
    wait.until(ExpectedConditions.visibilityOf(coordinates));
}
Also used : WebDriverWait(org.openqa.selenium.support.ui.WebDriverWait) LocationContext(org.openqa.selenium.html5.LocationContext) WebElement(org.openqa.selenium.WebElement) Location(org.openqa.selenium.html5.Location) Test(org.junit.Test)

Example 37 with Location

use of com.google.api.ads.admanager.axis.v202205.Location in project selenium-webdriver-java by bonigarcia.

the class LocationContextJupiterTest method testLocationContext.

@Test
void testLocationContext() {
    LocationContext location = (LocationContext) driver;
    location.setLocation(new Location(27.5916, 86.5640, 8850));
    driver.get("https://bonigarcia.dev/selenium-webdriver-java/geolocation.html");
    driver.findElement(By.id("get-coordinates")).click();
    WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(5));
    WebElement coordinates = driver.findElement(By.id("coordinates"));
    wait.until(ExpectedConditions.visibilityOf(coordinates));
}
Also used : WebDriverWait(org.openqa.selenium.support.ui.WebDriverWait) LocationContext(org.openqa.selenium.html5.LocationContext) WebElement(org.openqa.selenium.WebElement) Location(org.openqa.selenium.html5.Location) Test(org.junit.jupiter.api.Test)

Aggregations

StatementBuilder (com.google.api.ads.admanager.axis.utils.v202205.StatementBuilder)8 Random (java.util.Random)8 ReportDownloader (com.google.api.ads.admanager.axis.utils.v202205.ReportDownloader)7 ReportDownloadOptions (com.google.api.ads.admanager.axis.v202205.ReportDownloadOptions)7 ReportJob (com.google.api.ads.admanager.axis.v202205.ReportJob)7 ReportQuery (com.google.api.ads.admanager.axis.v202205.ReportQuery)7 ReportServiceInterface (com.google.api.ads.admanager.axis.v202205.ReportServiceInterface)7 File (java.io.File)7 URL (java.net.URL)7 Location (org.openqa.selenium.html5.Location)7 PublisherQueryLanguageServiceInterface (com.google.api.ads.admanager.axis.v202205.PublisherQueryLanguageServiceInterface)6 ResultSet (com.google.api.ads.admanager.axis.v202205.ResultSet)6 Test (org.junit.Test)5 LocationContext (org.openqa.selenium.html5.LocationContext)5 WebElement (org.openqa.selenium.WebElement)3 WebDriverWait (org.openqa.selenium.support.ui.WebDriverWait)3 AdUnitTargeting (com.google.api.ads.admanager.axis.v202108.AdUnitTargeting)2 GeoTargeting (com.google.api.ads.admanager.axis.v202108.GeoTargeting)2 InventoryTargeting (com.google.api.ads.admanager.axis.v202108.InventoryTargeting)2 Location (com.google.api.ads.admanager.axis.v202108.Location)2