Skip to content

Commit 06d5483

Browse files
committed
[master] - more little fixes
1 parent 1d38f55 commit 06d5483

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/main/java/net/itarray/automotion/internal/DriverFacade.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import io.appium.java_client.AppiumDriver;
44
import io.appium.java_client.android.AndroidDriver;
5+
import io.appium.java_client.ios.IOSDriver;
56
import org.openqa.selenium.*;
67
import org.openqa.selenium.remote.RemoteWebDriver;
78

@@ -39,24 +40,15 @@ public WebDriver getDriver() {
3940
}
4041

4142
public boolean isAppiumAndroidContext() {
42-
if ((driver instanceof AndroidDriver)) {
43-
return true;
44-
}
45-
return false;
43+
return driver instanceof AndroidDriver;
4644
}
4745

4846
public boolean isAppiumIOSContext() {
49-
if ((driver instanceof AndroidDriver)) {
50-
return true;
51-
}
52-
return false;
47+
return driver instanceof IOSDriver;
5348
}
5449

5550
public boolean isAppiumContext() {
56-
if ((driver instanceof AppiumDriver)) {
57-
return true;
58-
}
59-
return false;
51+
return driver instanceof AppiumDriver;
6052
}
6153

6254
public boolean isAppiumWebContext() {

0 commit comments

Comments
 (0)