Created
July 20, 2014 11:53
-
-
Save DominikDary/58a1a21e55eaabc1475a to your computer and use it in GitHub Desktop.
Test to verify the wait mechanism works fine in selendroid with the new netty implementation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 eBay Software Foundation and selendroid committers. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | |
* in compliance with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software distributed under the License | |
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | |
* or implied. See the License for the specific language governing permissions and limitations under | |
* the License. | |
*/ | |
package io.selendroid.driver; | |
import io.selendroid.SelendroidCapabilities; | |
import io.selendroid.SelendroidDriver; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.support.ui.ExpectedConditions; | |
import org.openqa.selenium.support.ui.WebDriverWait; | |
public class NettyWaitForElementTest { | |
private SelendroidDriver driver = null; | |
@Before | |
public void setup() throws Exception { | |
driver = | |
new SelendroidDriver( | |
SelendroidCapabilities.emulator("io.selendroid.testapp:0.11.0-SNAPSHOT")); | |
} | |
@Test | |
public void shouldOpenActivityAndWaitForWebview() throws Exception { | |
driver.get("and-activity://" + "io.selendroid.testapp." + "WebViewActivity"); | |
WebDriverWait wait = new WebDriverWait(driver, 60); | |
wait.until(ExpectedConditions.presenceOfElementLocated(By.id("mainWebView"))); | |
} | |
@After | |
public void tearDown() { | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment