Skip to content

Commit 42074c9

Browse files
Merge pull request #58 from WojtekKowaluk/master
Thanks for your work!!!
2 parents 5d1c774 + c1634e6 commit 42074c9

File tree

5 files changed

+29
-9
lines changed

5 files changed

+29
-9
lines changed

pom.xml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
<dependency>
6363
<groupId>org.seleniumhq.selenium</groupId>
6464
<artifactId>selenium-server</artifactId>
65-
<version>2.39.0</version>
65+
<version>2.43.1</version>
6666
</dependency>
6767
<dependency>
6868
<groupId>com.opera</groupId>
@@ -89,6 +89,21 @@
8989
<artifactId>json-simple</artifactId>
9090
<version>1.1.1</version>
9191
</dependency>
92+
<dependency>
93+
<groupId>org.seleniumhq.selenium</groupId>
94+
<artifactId>selenium-remote-driver</artifactId>
95+
<version>2.43.1</version>
96+
</dependency>
97+
<dependency>
98+
<groupId>io.selendroid</groupId>
99+
<artifactId>selendroid-client</artifactId>
100+
<version>0.11.0</version>
101+
</dependency>
102+
<dependency>
103+
<groupId>io.appium</groupId>
104+
<artifactId>java-client</artifactId>
105+
<version>2.0.0</version>
106+
</dependency>
92107
</dependencies>
93108

94109
<build>

src/main/java/com/github/markusbernhardt/selenium2library/keywords/BrowserManagement.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
import org.openqa.selenium.Dimension;
2727
import org.openqa.selenium.WebDriver;
2828
import org.openqa.selenium.WebElement;
29-
import org.openqa.selenium.android.AndroidDriver;
29+
import io.selendroid.SelendroidDriver;
3030
import org.openqa.selenium.chrome.ChromeDriver;
3131
import org.openqa.selenium.firefox.FirefoxDriver;
3232
import org.openqa.selenium.firefox.FirefoxProfile;
3333
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
3434
import org.openqa.selenium.ie.InternetExplorerDriver;
35-
import org.openqa.selenium.iphone.IPhoneDriver;
35+
import io.appium.java_client.ios.IOSDriver;
3636
import org.openqa.selenium.phantomjs.PhantomJSDriver;
3737
import org.openqa.selenium.remote.Augmenter;
3838
import org.openqa.selenium.remote.DesiredCapabilities;
@@ -1384,12 +1384,16 @@ protected WebDriver createLocalWebDriver(String browserName, DesiredCapabilities
13841384
return driver;
13851385
} else if ("iphone".equals(browserName) || "ipad".equals(browserName)) {
13861386
try {
1387-
return new IPhoneDriver(desiredCapabilities);
1387+
return new IOSDriver(new URL(""), desiredCapabilities);
13881388
} catch (Exception e) {
13891389
throw new Selenium2LibraryFatalException("Creating " + browserName + " instance failed.", e);
13901390
}
13911391
} else if ("android".equals(browserName)) {
1392-
return new AndroidDriver(desiredCapabilities);
1392+
try {
1393+
return new SelendroidDriver(desiredCapabilities);
1394+
} catch (Exception e) {
1395+
throw new Selenium2LibraryFatalException(e);
1396+
}
13931397
}
13941398

13951399
throw new Selenium2LibraryFatalException(browserName + " is not a supported browser.");

src/test/robotframework/objects/Google.Search.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Resource ../adapters/Selenium2Library.txt
55

66
*** Variables ***
77
${Google.Search.Locator.SearchField} id=gbqfq
8-
${Google.Search.Locator.SearchResult.Rtomac} xpath=//a[contains(.,'markusbernhardt')]
8+
${Google.Search.Locator.SearchResult.Rtomac} xpath=//a[contains(.,'MarkusBernhardt')]
99

1010
*** Keywords ***
1111
Search String
1212
[Arguments] ${Search.String}
1313
Input Text ${Google.Search.Locator.SearchField} ${Search.String}
1414
Press Key ${Google.Search.Locator.SearchField} \\13
15-
Wait Until Element Is Visible ${Google.Search.Locator.SearchResult.Rtomac}
15+
Wait Until Element Is Visible ${Google.Search.Locator.SearchResult.Rtomac}

src/test/robotframework/testsuites/UnitTests/Google.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Search With JavaScript Locator
2121
Selenium2Library.Add Location Strategy elementById return window.document.getElementById(arguments[0]);
2222
Input Text elementById=gbqfq Robotframework Selenium2Library Java
2323
Press Key elementById=gbqfq \\13
24-
Wait Until Element Is Visible xpath=//a[contains(.,'markusbernhardt')]
24+
Wait Until Element Is Visible xpath=//a[contains(.,'MarkusBernhardt')]
2525
Capture Page Screenshot
2626

2727
Search With JavaScript Locator And Delimiter
@@ -36,7 +36,7 @@ Search With JavaScript Locator Text
3636
Search Without Locator Type
3737
Input Text gbqfq Robotframework Selenium2Library Java
3838
Press Key gbqfq \\13
39-
Wait Until Element Is Visible //a[contains(.,'markusbernhardt')]
39+
Wait Until Element Is Visible //a[contains(.,'MarkusBernhardt')]
4040

4141
Get Id Of Active Element With JavaScript
4242
Input Text gbqfq Robotframework Selenium2Library

src/test/robotframework/testsuites/UnitTests/JSEvents.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ ${URL Application} http://fiddle.jshell.net/ShPVX/show/
99
*** Keywords ***
1010
Open Page
1111
Open Browser ${URL Application}
12+
Select Frame xpath=//iframe
1213
Wait Until Page Contains Element xpath=//select[@name='test']
1314

1415
*** Test Cases ***

0 commit comments

Comments
 (0)