Skip to content

Commit 06a2c34

Browse files
committed
fix tests. fixed a bug in context() introduced in #101
1 parent b46ea64 commit 06a2c34

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/java/io/appium/java_client/AppiumDriver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ public void ignoreUnimportantViews(Boolean compress) {
664664

665665
@Override
666666
public WebDriver context(String name) {
667-
if (_isNotNullOrEmpty(name)) {
667+
if (!_isNotNullOrEmpty(name)) {
668668
throw new IllegalArgumentException("Must supply a context name");
669669
}
670670

src/test/java/io/appium/java_client/AndroidGestureTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ public void MultiGestureSingleActionTest() throws InterruptedException {
6868

6969
@Test
7070
public void dragNDropTest() {
71+
72+
driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().description(\"Views\"))");
73+
driver.findElementByAccessibilityId("Views").click();
74+
7175
driver.findElement(MobileBy.AndroidUIAutomator("description(\"Drag and Drop\")")).click();
7276
WebElement actionBarTitle = driver.findElement(By.id("android:id/action_bar_title"));
7377

0 commit comments

Comments
 (0)