Skip to content

Instantly share code, notes, and snippets.

@bbchriscesar
Created December 15, 2019 14:55
Show Gist options
  • Select an option

  • Save bbchriscesar/82d2f11e6be7caf4ea1a56c86d3e0547 to your computer and use it in GitHub Desktop.

Select an option

Save bbchriscesar/82d2f11e6be7caf4ea1a56c86d3e0547 to your computer and use it in GitHub Desktop.
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):
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(executable_path=profile, options=options)
driver.get('https://www.google.com?hl=' + locales)
print('Navigate to URL')
time.sleep(4)
driver.find_elements_by_css_selector("a.gb_g")[0].click()
print('Clicked on Gmail link')
time.sleep(3)
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment