spicenero.blogg.se

Phonetrans keeps getting hung up
Phonetrans keeps getting hung up








phonetrans keeps getting hung up

While (WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.XPATH, "error-section"]//p'))) = True) : WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, 'a') If WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.XPATH, "error-section"]//p'))): WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//button"))).click() #National Account: Combo Premium Pooling Subscription WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//label"))).click() WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, 20).until(EC.element_to_be_clickable((By.XPATH, 20).until(EC.element_to_be_clickable((By.XPATH, Account: Combo Premium Pooling Subscription WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, Number WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, ID WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, Name WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, PasswordĮlement = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, = Select(state) UserName = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, + ADTest.DatUsrName) WebDriverWait(driver, 30).until(EC.element_to_be_clickable((By.XPATH, "//button"))).click() WebDriverWait(driver,20).until(EC.title_is("Admin")) #Tells program to wait till new window confirmed New_window = ĭriver.switch_to.window(driver.window_handles) WebDriverWait(driver, 10).until(EC.number_of_windows_to_be(2)) Windows_before = driver.current_window_handleĪdminbutton = driver.find_element(By.CSS_SELECTOR, '#userPreferencesUl > li:nth-child(5) > a') Logon = driver.find_element(By.XPATH, = driver.find_element(By.XPATH, = driver.find_element(By.XPATH, = driver.find_element(By.XPATH, original window ID # chrome_optinons.add_argument('-headless') # chrome_optinons = webdriver.ChromeOptions() Options.add_experimental_option('excludeSwitches', )ĭriver = webdriver.Chrome(options=options) Also please let me know if you see anything that I could clean up to make the script run better.įrom nnection import waitįrom webbrowser import BaseBrowser, Chromeįrom import NoSuchElementExceptionįrom import Optionsįrom import Byįrom import expected_conditions as ECįrom import Selectįrom import WebDriverWaitįrom import Keys Please let me know if you need any additional info.

#Phonetrans keeps getting hung up code#

When it get hung I get a ```TimeoutException error``, I want it to continue through the rest of the code if the conditions have been met. It keeps getting hung up if the username doesn't need a number added or if the account only needs a 1 added. Then a while loop to add a 2-10 if needed along with a IF statement in the while loop to BREAK if the condition is met and then a else statement to continue. I use a IF statement to put the 1 behind the user name. Once that happens I want to skip the rest of the loop and move on through the rest of the code. If the user name with a one is taken I want it to backspace and add a 2 etc until the error no longer pops up. Basically if the username is already taken I want it to add a 1 to the end of the user name. I have been able to get through the entire webpage but I am running into a issue with the script handling a username error. Creating a script that will pull user information from AD and pass that information into a automation program that generates user accounts for a webpage.










Phonetrans keeps getting hung up