diff --git a/.github/workflows/continuous-testing.yml b/.github/workflows/continuous-testing.yml index 061e41e..2948314 100644 --- a/.github/workflows/continuous-testing.yml +++ b/.github/workflows/continuous-testing.yml @@ -6,8 +6,6 @@ on: pull_request: branches: [ main ] - workflow_dispatch: - env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} diff --git a/README.md b/README.md index d017154..6ad510b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Automação de Testes para Android com Java, JUnit 5 e Appium, com integração com o BrowserStack. +# Automação de Testes para Android utilizando Java, JUnit 5 e Appium 9.2.0, com integração com o BrowserStack. + +[![BrowserStack Tests](https://github.com/thinogueiras/Java-Appium-BrowserStack/actions/workflows/continuous-testing.yml/badge.svg?branch=main)](https://github.com/thinogueiras/Java-Appium-BrowserStack/actions/workflows/continuous-testing.yml) ## Pré-requisitos mínimos de ambiente: diff --git a/src/test/java/qa/thinogueiras/appium/core/DriverFactory.java b/src/test/java/qa/thinogueiras/appium/core/DriverFactory.java deleted file mode 100644 index 6269029..0000000 --- a/src/test/java/qa/thinogueiras/appium/core/DriverFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -package qa.thinogueiras.appium.core; - -import java.net.MalformedURLException; -import java.net.URL; - -import io.appium.java_client.AppiumDriver; -import io.appium.java_client.android.options.UiAutomator2Options; - -public class DriverFactory { - - public static AppiumDriver driver; - - public static AppiumDriver getDriver() { - if (driver == null) { - createDriver(); - } - return driver; - } - - private static void createDriver() { - UiAutomator2Options options = new UiAutomator2Options(); - options.setCapability("platformName", "Android"); - options.setCapability("deviceName", "Android Emulator"); - options.setCapability("automationName", "UIAutomator2"); - options.setCapability("app", "C:\\Users\\Thiago\\eclipse-workspace\\Java-Appium-Tests\\app\\yodapp-beta.apk"); - options.setCapability("udid", "emulator-5554"); - options.setCapability("autoGrantPermissions", true); - - try { - driver = new AppiumDriver(new URL("http://localhost:4723"), options); - } catch (MalformedURLException e) { - e.printStackTrace(); - } - } - - public static void killDriver() { - if (driver != null) { - driver.quit(); - driver = null; - } - } -} \ No newline at end of file