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
Point source = slider.getLocation(); | |
PointerInput finger = new PointerInput(PointerInput.Kind.TOUCH, "finger"); | |
Sequence sequence = new Sequence(finger, 1); | |
sequence.addAction(finger.createPointerMove(ofMillis(0), | |
PointerInput.Origin.viewport(), source.x, source.y)); | |
sequence.addAction(finger.createPointerDown(PointerInput.MouseButton.MIDDLE.asArg())); | |
sequence.addAction(new Pause(finger, ofMillis(600))); | |
sequence.addAction(finger.createPointerMove(ofMillis(600), | |
PointerInput.Origin.viewport(), source.x + 400, source.y)); | |
sequence.addAction(finger.createPointerUp(PointerInput.MouseButton.MIDDLE.asArg())); |
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
// Start visual UI testing | |
eyes.open(driver, "iOS test application", "test"); | |
// Visual validation point #1 | |
eyes.checkWindow("Initial view"); | |
driver.findElementByAccessibilityId("Views").click() | |
// Visual validation point #2 | |
eyes.checkWindow("After compute"); |
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
// Android DataMatchers | |
driver.findElementByAndroidDataMatcher(orderJSON.toString().click() | |
// iOS NSPredicates | |
driver.findElement(MobileBy.iOSNsPredicateString("name IN {'chained VieW','Demos wheel picker color'} AND visible == 1")).click(); | |
// iOS Class Chain | |
driver.findElement(MobileBy.iOSClassChain("'XCUIElementTypeWindow'/**/XCUIElementTypeStaticText[2]")); |
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 mainActivityTest2() { | |
onView(withId(R.id.digit_1)).perform(click()); | |
onView(withId(R.id.op_add)).perform(click()); | |
onView(withId(R.id.digit_2)).perform(click()); | |
onView(withId(R.id.eq)).perform(click()); | |
onView(allOf(Matchers.instanceOf(android.widget.EditText.class), | |
withText("3"))).check(matches(isDisplayed())); | |
} |
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
// Interacting with pickers | |
let first = NSPredicate(format: "label BEGINSWITH 'Picker'") | |
let picker = app.pickerWheels.element(matching: first) | |
picker.adjust(toPickerWheelValue: "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
// XCTNSPredicateExpectation | |
let expectation = XCTNSPredicateExpectation(predicate: NSPredicate(format: "name IN {'chained VieW','Demos wheel picker color'} AND visible == 1 "), object: xCUIElement) |
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
context('Home', () => { | |
beforeEach(() => cy.visit('https://demo.applitools.com')); | |
it('should log in to the application and land on the dashboard', () => { | |
cy.get('#log-in').click(); | |
cy.get('.element-header').eq(0).contains('Financial Overview'); | |
cy.get('.element-header').eq(1).contains('Recent Transactions'); | |
}); |
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
context('Home', () => { | |
beforeEach(() => cy.visit('https://demo.applitools.com')); | |
it('should log in to the application and land on the dashboard', () => { | |
cy.eyesOpen({ | |
appName: 'Demo App', | |
testName: 'Login', | |
}); | |
cy.eyesCheckWindow({ tag: 'Login Window' }); |
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
{ | |
company { | |
name | |
ceo | |
coo | |
} | |
} |
OlderNewer