Skip to content

Instantly share code, notes, and snippets.

View Jaimin180296's full-sized avatar
🏠
Working from home

Jaimin Mehta Jaimin180296

🏠
Working from home
View GitHub Profile
require 'watir'
caps = {
browserName: 'Chrome',
browserVersion: '91',
url: 'https://<username>:<accesskey>@hub-use.browserstack.com/wd/hub',
acceptInsecureCerts: true,
resolution: '1920x1080',
projectName: 'Console_Logs_Debug',
buildName: 'Chrome_Console_Logs_Debug',
import io.appium.java_client.ios.IOSDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.JavascriptExecutor;
import java.io.FileOutputStream;
import java.io.OutputStream;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.Test;
import java.net.MalformedURLException;
import java.net.URL;
describe('Google\'s Search Functionality', function() {
it('can find search results', function() {
browser.waitForAngularEnabled(false);
browser.get("https://opensource-demo.orangehrmlive.com/")
browser.manage().timeouts().implicitlyWait(15000);
element(by.id("txtUsername")).sendKeys("Admin");
element(by.id("txtPassword")).sendKeys("admin123");
element(by.id("btnLogin")).click();
browser.sleep(3000)
var admin= element(by.id("menu_admin_viewAdminModule"));
package BrowserStack;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
driver.get("https://www-am-uat1-global-vuse.non-prod.marketing.bat.net/co/es/customer/account/create/");
WebDriverWait wait;
wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[text()='Aceptar todas las cookies']"))).click();
Select objSelect = new Select(driver.findElement(By.id("age-gate-dob-day")));
objSelect.selectByIndex(4);
Select objSelect1 = new Select(driver.findElement(By.id("age-gate-dob-month")));
objSelect1.selectByIndex(4);
Select object2 = new Select(driver.findElement(By.id("age-gate-dob-year")));
object2.selectByIndex(20);
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.SessionId;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
package BrowserStack;
import io.appium.java_client.ios.IOSDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import io.appium.java_client.ios.IOSDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;