Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,17 @@ jobs:

variables:
ANDROID_EMU_NAME: test
ANDROID_SDK_ID: system-images;android-28;google_apis_playstore;x86
ANDROID_SDK_ID: system-images;android-30;google_apis_playstore;x86_64

steps:
- task: CmdLine@2
displayName: 'Configure Appium and Android SDK'
inputs:
script: |
echo "Configuring Environment"
export PATH=$PATH:$JAVA_HOME/bin
brew install --cask temurin@8
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export PATH=$JAVA_HOME/bin:$PATH
echo export "ANDROID_HOME=\$ANDROID_HOME" >> ~/.bash_profile
export PATH=$PATH:$ANDROID_HOME

Expand All @@ -74,14 +76,21 @@ jobs:
$ANDROID_HOME/emulator/emulator -list-avds

echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot > /dev/null 2>&1 &
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot -verbose > /dev/null 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device
while [[ $? -ne 0 ]]; do sleep 1; $ANDROID_HOME/platform-tools/adb shell pm list packages; done;
for i in {1..300}; do
$ANDROID_HOME/platform-tools/adb shell pm list packages >/dev/null 2>&1 && break
sleep 2
done
if [[ $i -eq 60 ]]; then
echo "Emulator failed to boot in time" >&2
exit 1
fi
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"

echo "Installing Appium"
npm install -g appium@next
npm install -g appium@2
ln -fs /usr/local/lib/node_modules/appium/build/lib/main.js /usr/local/bin/appium
chmod +x /usr/local/bin/appium
export PATH=$PATH:/usr/local/bin/appium
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@
<dependency>
<groupId>com.github.aquality-automation</groupId>
<artifactId>aquality-selenium-core</artifactId>
<version>4.0.3</version>
<version>4.6.0</version>
</dependency>

<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>9.2.3</version>
<version>9.5.0</version>
</dependency>

<dependency>
Expand All @@ -208,14 +208,14 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
<version>3.17.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
<version>2.19.0</version>
<scope>test</scope>
</dependency>

Expand Down
14 changes: 7 additions & 7 deletions src/test/java/samples/android/ITestRadioButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ public interface ITestRadioButton {

default void testRadioButton() {
openRadioButtonsScreen();
IRadioButton button1 = getRadioButton(1);
Assert.assertFalse(button1.isChecked(), "RadioButton should not be checked initially");
button1.click();
Assert.assertTrue(button1.isChecked(), "RadioButton should be checked after click on it");
getRadioButton(2).click();
Assert.assertFalse(button1.isChecked(),
String.format("RadioButton %s should not be checked after click on another option", button1.getName()));
IRadioButton button2 = getRadioButton(2);
Assert.assertFalse(button2.isChecked(), "RadioButton should not be checked initially");
button2.click();
Assert.assertTrue(button2.isChecked(), "RadioButton should be checked after click on it");
getRadioButton(1).click();
Assert.assertFalse(button2.isChecked(),
String.format("RadioButton %s should not be checked after click on another option", button2.getName()));
}
}
2 changes: 1 addition & 1 deletion src/test/java/samples/android/web/WebRadioButtonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class WebRadioButtonTest extends AndroidWebTest implements ITestRadioButt

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

@Override
Expand Down
Loading