Posts

Showing posts with the label selenium-chromedriver

Selenium Python get_element by ID failing

Image
Clash Royale CLAN TAG #URR8PPP Selenium Python get_element by ID failing Can someone help me understand why my code fails to find the element by ID. Code below: from selenium import webdriver driver=webdriver.Firefox() driver.get('https://app.waitwhile.com/checkin/lltest3/user') element = driver.find_element_by_id("guestPhone") Inspecting element shows the ID clearly. <input type="tel" name="guestPhone" id="guestPhone" class="form-control ng-pristine ng-empty ng-invalid ng-invalid-phone-validator ng-invalid-required ng-touched" ng-model="form.model" ng-model-options="{ 'updateOn': 'default blur', 'debounce': { 'default': 350, 'blur': 0 } }" uib-typeahead="guest.phone for guest in form.onChange({value:$viewValue})" typeahead-min-length="6" typeahead-on-select="form.onSelect({guest:$item})" typeahead-select-on-exact="true" uib-to...

Clicking The “Unclickable” Button with Python, selenium, chromedriver

Image
Clash Royale CLAN TAG #URR8PPP Clicking The “Unclickable” Button with Python, selenium, chromedriver I am running into trouble with a script trying to click a button with the following code in Python 3.7 using Selenium and Chromedriver: driver.find_element_by_xpath("/html/body/section/main/section[1]/section[1]/div/div/div/form/div/div/div[1]/ul/li[2]/h2/button").submit() search_cit = driver.find_element_by_xpath("/html/body/section/main/section[1]/section[1]/div/div/div/form/div/div/div[2]/div[3]/div/input") search_cit.clear() search_cit.send_keys(search_city) driver.find_element_by_xpath("/html/body/section/main/section[1]/section[1]/div/div/div/form/div/div/div[2]/div[4]/button[1]").click() and am met with the following error:enter image description here By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie p...

How to handle browser notification popup which is without any elements?

Image
Clash Royale CLAN TAG #URR8PPP How to handle browser notification popup which is without any elements? How to press the OK button as per the image. I can switch to this window. but it is not loaded till i click ok, so there is no any elements. Alert handle does't helped too. Autoit cannot detect this pop up message too. disable-notifications cant help too. Any ideas? Two screeshots is added. OK Firefox snapshot: Chrome Snapshot: p.companieGenreal.sActivities().click(); driver.switchTo().defaultContent(); String parent = driver.getWindowHandle(); p.companieGenreal.sAddNew().click(); p.companieGenreal.sAddJobOrder().click(); p.companieGenreal.sContract().click(); swithToChildWindow(parent); driver.switchTo().alert().accept(); Your code trials? – DebanjanB 1 hour ago I can switch to this window. How did yo...