Skip to content

Instantly share code, notes, and snippets.

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

Christianne Cesar bbchriscesar

🏠
Working from home
View GitHub Profile
import pytest
from selenium import webdriver
@pytest.fixture()
def setup(request):
print("initiating chrome driver")
driver = webdriver.Chrome(executable_path=r'C:\Users\Christianne II\PycharmProjects\ParallelTesting\Drivers\chromedriver_01.exe')
request.instance.driver = driver
driver.get("http://seleniumeasy.com/test")
driver.maximize_window()
from selenium import webdriver
import time
import pytest
@pytest.mark.parametrize("language", ['en-US', 'ja', 'ko', 'hi', 'de', 'ar'])
def test_sampleParallel(language):
driver = webdriver.Chrome(executable_path='/Users/christiannec/PycharmProjects/iOS/Drivers/chromedriver')
driver.implicitly_wait(10)
driver.get('https://www.google.com?hl=' + language)
time.sleep(3)
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains as chains
import time
xpath = By.XPATH
id = By.ID
css = By.CSS_SELECTOR
import pytest
from selenium import webdriver
import os
import time
prof1 = os.getcwd() + "/Drivers/chromedriver_01.exe"
prof2 = os.getcwd() + "/Drivers/chromedriver_02.exe"
@pytest.mark.parametrize("profile, locales", [(prof1, "ja"), (prof2), "ko"])
def test_ParallelFramework(profile, locales):
from selenium import webdriver
from PIL import Image
import os.path
options = webdriver.ChromeOptions()
options.add_argument('user-data-dir=/usr/local/google/home/christiannec/.config/google-chrome/Profile_01')
options.add_argument("--start-maximized")
driver = webdriver.Chrome(executable_path="/usr/local/google/home/christiannec/ChromeBrowserDriver/chromedriver_01", options=options)
locales = ['en-US']
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
import time
driver = webdriver.Chrome(executable_path='Driver/chromedriver.exe')
xpath = By.XPATH
id = By.ID
export ANDROID_HOME=/Users/christiannec/Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export ANDROID_SDK_ROOT=/Users/christiannec/Library/Android/sdk
from selenium import webdriver
import os.path
import time
options = webdriver.ChromeOptions()
options.add_argument('user-data-dir=/usr/local/google/home/christiannec/.config/google-chrome/Profile_04')
options.add_argument("--start-maximized")
driver = webdriver.Chrome(executable_path="/usr/local/google/home/christiannec/ChromeBrowserDriver/chromedriver_04", options=options)
def openNewTab(URL):
from selenium import webdriver
from PIL import Image
import time
options = webdriver.ChromeOptions()
options.add_argument('user-data-dir=/usr/local/google/home/christiannec/.config/google-chrome/Profile_04')
options.add_argument("--start-maximized")
driver = webdriver.Chrome(executable_path="/usr/local/google/home/christiannec/ChromeBrowserDriver/chromedriver_04", options=options)
driver.get('https://www.google.com.ph/maps/@14.5135378,121.0654025,13z?hl=en')
import org.openqa.selenium.WebDriver;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class ScreenCapture extends BaseClass {
public static WebDriver driver;