Skip to content

Commit 1c752cb

Browse files
authored
Update to Appium 9.5.0 and Selenium 4.33.0 +semver:feature (#45)
* Update to Appium 9.5.0 and Selenium 4.33.0 +semver:feature * use x64 image, stabilize radiobutton test * fix pipeline waiting for emulator
1 parent 1b83944 commit 1c752cb

File tree

4 files changed

+26
-17
lines changed

4 files changed

+26
-17
lines changed

azure-pipelines.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,17 @@ jobs:
5353

5454
variables:
5555
ANDROID_EMU_NAME: test
56-
ANDROID_SDK_ID: system-images;android-28;google_apis_playstore;x86
56+
ANDROID_SDK_ID: system-images;android-30;google_apis_playstore;x86_64
5757

5858
steps:
5959
- task: CmdLine@2
6060
displayName: 'Configure Appium and Android SDK'
6161
inputs:
6262
script: |
6363
echo "Configuring Environment"
64-
export PATH=$PATH:$JAVA_HOME/bin
64+
brew install --cask temurin@8
65+
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
66+
export PATH=$JAVA_HOME/bin:$PATH
6567
echo export "ANDROID_HOME=\$ANDROID_HOME" >> ~/.bash_profile
6668
export PATH=$PATH:$ANDROID_HOME
6769
@@ -74,14 +76,21 @@ jobs:
7476
$ANDROID_HOME/emulator/emulator -list-avds
7577
7678
echo "Starting emulator"
77-
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot > /dev/null 2>&1 &
79+
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot -verbose > /dev/null 2>&1 &
7880
$ANDROID_HOME/platform-tools/adb wait-for-device
79-
while [[ $? -ne 0 ]]; do sleep 1; $ANDROID_HOME/platform-tools/adb shell pm list packages; done;
81+
for i in {1..300}; do
82+
$ANDROID_HOME/platform-tools/adb shell pm list packages >/dev/null 2>&1 && break
83+
sleep 2
84+
done
85+
if [[ $i -eq 300 ]]; then
86+
echo "Emulator failed to boot in time" >&2
87+
exit 1
88+
fi
8089
$ANDROID_HOME/platform-tools/adb devices
8190
echo "Emulator started"
8291
8392
echo "Installing Appium"
84-
npm install -g appium@next
93+
npm install -g appium@2
8594
ln -fs /usr/local/lib/node_modules/appium/build/lib/main.js /usr/local/bin/appium
8695
chmod +x /usr/local/bin/appium
8796
export PATH=$PATH:/usr/local/bin/appium

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@
189189
<dependency>
190190
<groupId>com.github.aquality-automation</groupId>
191191
<artifactId>aquality-selenium-core</artifactId>
192-
<version>4.0.3</version>
192+
<version>4.6.0</version>
193193
</dependency>
194194

195195
<dependency>
196196
<groupId>io.appium</groupId>
197197
<artifactId>java-client</artifactId>
198-
<version>9.2.3</version>
198+
<version>9.5.0</version>
199199
</dependency>
200200

201201
<dependency>
@@ -208,14 +208,14 @@
208208
<dependency>
209209
<groupId>org.apache.commons</groupId>
210210
<artifactId>commons-lang3</artifactId>
211-
<version>3.14.0</version>
211+
<version>3.17.0</version>
212212
<scope>test</scope>
213213
</dependency>
214214

215215
<dependency>
216216
<groupId>commons-io</groupId>
217217
<artifactId>commons-io</artifactId>
218-
<version>2.16.1</version>
218+
<version>2.19.0</version>
219219
<scope>test</scope>
220220
</dependency>
221221

src/test/java/samples/android/ITestRadioButton.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ public interface ITestRadioButton {
1111

1212
default void testRadioButton() {
1313
openRadioButtonsScreen();
14-
IRadioButton button1 = getRadioButton(1);
15-
Assert.assertFalse(button1.isChecked(), "RadioButton should not be checked initially");
16-
button1.click();
17-
Assert.assertTrue(button1.isChecked(), "RadioButton should be checked after click on it");
18-
getRadioButton(2).click();
19-
Assert.assertFalse(button1.isChecked(),
20-
String.format("RadioButton %s should not be checked after click on another option", button1.getName()));
14+
IRadioButton button2 = getRadioButton(2);
15+
Assert.assertFalse(button2.isChecked(), "RadioButton should not be checked initially");
16+
button2.click();
17+
Assert.assertTrue(button2.isChecked(), "RadioButton should be checked after click on it");
18+
getRadioButton(1).click();
19+
Assert.assertFalse(button2.isChecked(),
20+
String.format("RadioButton %s should not be checked after click on another option", button2.getName()));
2121
}
2222
}

src/test/java/samples/android/web/WebRadioButtonTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class WebRadioButtonTest extends AndroidWebTest implements ITestRadioButt
1010

1111
@Override
1212
public void openRadioButtonsScreen() {
13-
AqualityServices.getApplication().getDriver().get("http://www.echoecho.com/htmlforms10.htm");
13+
AqualityServices.getApplication().getDriver().get("https://formy-project.herokuapp.com/radiobutton");
1414
}
1515

1616
@Override

0 commit comments

Comments
 (0)