How to make while for example
this is my code and I want to make an automatic python script for 5 registration account

from import

driver = webdriver.Chrome(“C:chromedriver_win32chromedriver.exe”)
driver.set_page_load_timeout(30)

driver.get(“http://site.com“)
driver.maximize_window()
driver.implicitly_wait(20)
driver.find_element_by_xpath(“(//a[contains(text(),’Register’)])[2]”).click()
driver.find_element_by_id(‘first_name’).send_keys(“joe”);
driver.find_element_by_id(‘last_name’).send_keys(“joe”);
driver.find_element_by_css_selector(‘div.page-columnMain > form > div.form-group > #email’).send_keys(“[email protected]”)
driver.find_element_by_css_selector(‘div.form-group.form-group–half > #password’).send_keys(“test2”);
driver.find_element_by_id(‘password_confirmation’).send_keys(‘test2′);
driver.find_element_by_name(“agree”).click();
driver.find_element_by_xpath(“(//button[@type=’submit’])[2]”).click();



Source link https://sqa.stackexchange.com/questions/34654/how-to-make-while-loop-for-example-5-automatic-registration-account

LEAVE A REPLY

Please enter your comment!
Please enter your name here