This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DesiredCapabilities capabilities = new DesiredCapabilities(); | |
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator"); | |
capabilities.setCapability(IOSMobileCapabilityType.LAUNCH_TIMEOUT, 900000); | |
// Session is created using Android Espresso Driver | |
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.ESPRESSO); | |
capabilities.setCapability(MobileCapabilityType.APP, System.getProperty("user.dir") + "/apps/ApiDemos.apk"); | |
driver = new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"), capabilities); | |
driver.findElementByAccessibilityId("Views").click(); | |
// Switch to Android UIAutomator2 from Espresso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleInstrumentedTest { | |
@rule | |
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule(MainActivity.class); | |
@Test | |
public void simpleTeset() { | |
//Initialize the eyes SDK and set your private API key. | |
Eyes eyes = new Eyes(); | |
eyes.setApiKey("YOUR_API_KEY"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- '**' | |
env: | |
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }} | |
APPLITOOLS_BATCH_ID: ${{ github.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void loginTest() { | |
//Open browser | |
//This is our first instruction, directing us to the login page. One line of code. | |
driver.get("http://localhost:8000/loginBefore.html") | |
//Click on the Login button | |
//This is our second instruction, directing action by finding the id 'log-in' and clicking. One line of code. | |
driver.findElement(By.id("log-in")).click(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void loginClassicTest() { | |
//Open browser | |
//This is our first instruction, directing us to the login page. One line of code. | |
driver.get("http://localhost:8000/loginBefore.html") | |
//Click on the Login button | |
//This is our second instruction, directing action by finding the id 'log-in' and clicking. One line of code. | |
driver.findElement(By.id("log-in")).click(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Transaction> unsortedTransactions = transactionsTable.allData(); | |
List<Line> images = transactionsTable.rowsImages(); | |
transactionsTable.headerUI().select("AMOUNT"); | |
transactionsTable.assertThat() | |
.rows(hasItems(toArray(unsortedTransactions))) | |
.sortedBy((prev,next) -> prev.amount.value() < next.amount.value()) | |
.rowsVisualValidation("Description", images); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<Transaction> unsortedTransactions = transactionsTable.allData(); | |
transactionsTable.headerUI().select("AMOUNT"); | |
transactionsTable.assertThat() | |
.rows(hasItems(toArray(unsortedTransactions))) | |
.sortedBy((prev,next) -> prev.amount.value() < next.amount.value()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginPage extends WebPage { | |
@UI(".auth-header") Label header; | |
@UI(".logo-w img") Image circleImage; | |
@UI(".alert-warning") public Text alert; | |
@ByText("Username") Label userLabel; | |
@ByText("Password") Label passwordLabel; | |
@UI(".os-icon-user-male-circle") Icon userIcon; | |
@UI(".os-icon-fingerprint") Icon fingerprintIcon; | |
@UI(".form-check-label") Checkbox rememberMe; | |
@UI("[src*=twitter]") Icon twitter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------------------------ | |
// Legacy code based testing | |
// ------------------------------------------------------------------ | |
@Test | |
public void productListTest() { | |
// ----- Check the 1st Item ----- | |
By firstItem = By.id("__item0-container-cart---category--productList-0-titleText-inner"); | |
waitForExistence(firstItem); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d14613.381974540789!2d133.87137518023806!3d-23.699353203831237!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x2b321944be8f1331%3A0x50217a82a254fd0!2sAlice%20Springs%20NT%200870%2C%20Australia!5e0!3m2!1sen!2sus!4v1574447375313!5m2!1sen!2sus" width="600" height="450" frameborder="0" style="border:0;" allowfullscreen=""></iframe> |
NewerOlder