This file contains hidden or 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 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() |
This file contains hidden or 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
| 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) |
This file contains hidden or 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
| 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 |
This file contains hidden or 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 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): |
This file contains hidden or 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
| 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'] |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| 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): |
This file contains hidden or 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
| 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') |
This file contains hidden or 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 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; |