View login.java
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 void loginSuccessfully() { | |
//something like this, needs more work | |
app().visit(); | |
app().login() | |
assertTrue(app().isUserLoggedIn()); | |
} | |
public class App(){ | |
public void visit(){ | |
//can visit with a page |
View azureOnSauceWithJava.yml
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
# Maven | |
# Build your Java project and run tests with Apache Maven. | |
# Add steps that analyze code, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/java | |
trigger: | |
- main | |
pr: | |
- main | |
pool: |
View SimpleExample.cs
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 void mainTestCode(){ | |
//put all the logic here | |
} | |
[TestMethod] | |
public void test1(){ | |
mainTestCode(); | |
} | |
[TestMethod] | |
public void test2(){ | |
mainTestCode(); |
View cypress.spec.js
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('Login page', ()=>{ | |
beforeEach(()=> { | |
cy.visit('https://www.saucedemo.com/') | |
}) | |
it('can open page', () => { | |
cy.title().should('eq', 'Swag Labs') | |
}) | |
it('can login', () => { | |
cy.get('#user-name').type('standard_user') |
View BadGherkin.feature
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
Given driver webUrl + "/demo" | |
And input("#abr02tre", Key.CONTROL + "a") | |
And match temp contains "565d" | |
And match temp contains "5d" | |
When input("#rc02ert", "test") | |
Then text("divId45") |
View mocha.test.js
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
var assert = require('assert'); | |
let failureCount = 0; | |
before(function () { | |
console.log('before()', failureCount) | |
}); | |
beforeEach(function () { | |
console.log('beforeEach()', failureCount) | |
}); |
View AppiumCapabilities.java
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
@Before | |
public void setUp() throws MalformedURLException { | |
logger.debug("Started setUp();"); | |
logger.debug("platformVersion=>" + platformVersion + ". deviceName=>" + deviceName); | |
MutableCapabilities capabilities = new MutableCapabilities(); | |
capabilities.setCapability("appiumVersion", "1.16.0"); | |
capabilities.setCapability("autoAcceptAlerts", "true"); | |
capabilities.setCapability("idleTimeout", "90"); | |
capabilities.setCapability("noReset", "true"); |
View AndroidCapabilities.cs
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
var capabilities = new AppiumOptions(); | |
//We can run on any version of the platform as long as it's the correct device | |
//Make sure to pick an Android or iOS device based on your app | |
capabilities.AddAdditionalCapability(MobileCapabilityType.DeviceName, "Google Pixel 4"); | |
capabilities.AddAdditionalCapability(MobileCapabilityType.PlatformName, "Android"); | |
//make sure you set locale as sometimes it opens in a different location and throws off locations | |
capabilities.AddAdditionalCapability("locale", "en"); | |
capabilities.AddAdditionalCapability("language", "en"); | |
//The next major version of Appium (2.x) will **require** this capability | |
capabilities.AddAdditionalCapability("automationName", "UiAutomator2"); |
View setBuildName.java
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
import com.saucelabs.saucebindings; | |
SauceOptions sauceOptions = new SauceOptions(); | |
//Set a build name | |
sauceOptions.setBuild("Sample Build Name"); | |
new SauceSession(sauceOptions).start(); |
NewerOlder