Skip to content

Instantly share code, notes, and snippets.

Just living the good life


Just living the good life
View GitHub Profile
nadvolod / azureOnSauceWithJava.yml
Created Feb 1, 2021
A working Azure Pipelines for Java, Selenium, SauceLabs
View azureOnSauceWithJava.yml
# Maven
# Build your Java project and run tests with Apache Maven.
# Add steps that analyze code, save build artifacts, deploy, and more:
- main
- main
View SimpleExample.cs
public void mainTestCode(){
//put all the logic here
public void test1(){
public void test2(){
nadvolod / cypress.spec.js
Created Sep 11, 2020
Sample Cypress tests
View cypress.spec.js
context('Login page', ()=>{
beforeEach(()=> {
it('can open page', () => {
cy.title().should('eq', 'Swag Labs')
it('can login', () => {
nadvolod /
Created Sep 8, 2020
An optimized radio button clicking test
public void optimizedTest() throws AssertionError {
var male = driver.findElement("sex-0"));
var actions = new Actions(driver);
var female = driver.findElement("sex-1"));
nadvolod / BadGherkin.feature
Last active Aug 31, 2020
Bad Gherkin example
View BadGherkin.feature
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
var assert = require('assert');
let failureCount = 0;
before(function () {
console.log('before()', failureCount)
beforeEach(function () {
console.log('beforeEach()', failureCount)
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");
nadvolod / AndroidCapabilities.cs
Created Jul 15, 2020
Setting up Android capabilities for a real device test in Sauce Labs
View AndroidCapabilities.cs
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");
import com.saucelabs.saucebindings;
SauceOptions sauceOptions = new SauceOptions();
//Set a build name
sauceOptions.setBuild("Sample Build Name");
new SauceSession(sauceOptions).start();
nadvolod / POM.xml
Created Jun 14, 2020
How to fix maven compiler errors
View POM.xml
<!-- -->