webdriverwait

Clicking on Javascript tab using Selenium and Python without unique class id or element name

删除回忆录丶 提交于 2020-01-25 06:17:48
问题 I have this HTML element code which I am currently struggling to figure out to use it for clicking on the tab that says Problem. As the "Problem" doesnt have a unique classname or element ID, I am unable to figure how to send a Click(). I have tried to check if z-index can be used as index(assumed) and used below line of code browser.switch_to_frame(a[3]) but it seems I am wrong. HTML code as below <div class="TabsViewPort" style="position: relative; overflow: hidden; width: 896px; height:

Clicking on Javascript tab using Selenium and Python without unique class id or element name

你离开我真会死。 提交于 2020-01-25 06:17:44
问题 I have this HTML element code which I am currently struggling to figure out to use it for clicking on the tab that says Problem. As the "Problem" doesnt have a unique classname or element ID, I am unable to figure how to send a Click(). I have tried to check if z-index can be used as index(assumed) and used below line of code browser.switch_to_frame(a[3]) but it seems I am wrong. HTML code as below <div class="TabsViewPort" style="position: relative; overflow: hidden; width: 896px; height:

InvalidElementStateException when attempting to clear text through Selenium

痞子三分冷 提交于 2020-01-24 20:14:08
问题 The web application I am testing requires confirmation when deleting a record. I have created a test to enter in a valid reason for deleting this record. The code to do this is as follows: DeleteFieldButton. Click(); WaitMethods.WaitForElementToBeDisplayed(RemovalReason, 20); RemovalReason .Click(); RemovalReason .Clear(); RemovalReason .SendKeys("Automated Test - Delete Field"); The XPath to the text box is as follows: private Label RemovalReason = new Label(By.XPath("//*[@placeholder =

How to expand the reviews and scrape the text clicking for the next page using Selenium and Python

落花浮王杯 提交于 2020-01-22 02:32:07
问题 I wish to scrape reviews from this url: https://seedly.sg/reviews/p2p-lending/funding-societies by using selenium. For my '''Automation of getting to the next page''' code (clicking for the next page),ElementClickInterceptedException and NoSuchElementException have continuously been thrown even though the element exist, the xpath is correct and it has even run successfully for several times. I added sleeps intentionally but this is still not working. May I know how should I solve this? Thanks

How to scroll UP to an element and click in selenium?

风流意气都作罢 提交于 2020-01-22 00:38:31
问题 I have a scenario where system needs to scroll UP to the webelement in the left panel of the page and click to perform other operations.I have tried the below ways but none of them are working.Please suggest : 1. WebElement element = driver.findElement(By.xpath("element")); ((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element); Thread.sleep(500); 2. WebElement element = driver.findElement(By.xpath("element")); Actions actions = new Actions(driver); actions

Unable to locate element of credit card number using selenium python

Deadly 提交于 2020-01-19 01:50:28
问题 I am working to enter info in the input field with using selenium with python. The element I'm trying to access is <input type="tel" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" class="number" data-braintree-name="number" name="credit-card-number" id="credit-card-number" maxlength="22" placeholder="•••• •••• •••• ••••" aria-describedby="field-description-number" style="background-image: url("data:image/png;base64

InvalidElementStateException invalid element state: Element must be user-editable in order to clear it" error while sending text with Selenium Python

空扰寡人 提交于 2020-01-15 04:42:25
问题 I have an input HTML element like this in Django <input id="id" type="number" maxlength="50"> When I want to find and clear it elm_input = self.wait.until(EC.presence_of_element_located((By.ID, elm_id))) elm_input.clear() elm_input.send_keys(value) It's got error InvalidElementStateException InvalidElementStateException invalid element state: Element must be user-editable in order to clear it" We cannot send key clear because selenium know CLEAR or DELETE Keys is an Charactics Keys not an

InvalidElementStateException invalid element state: Element must be user-editable in order to clear it" error while sending text with Selenium Python

帅比萌擦擦* 提交于 2020-01-15 04:41:27
问题 I have an input HTML element like this in Django <input id="id" type="number" maxlength="50"> When I want to find and clear it elm_input = self.wait.until(EC.presence_of_element_located((By.ID, elm_id))) elm_input.clear() elm_input.send_keys(value) It's got error InvalidElementStateException InvalidElementStateException invalid element state: Element must be user-editable in order to clear it" We cannot send key clear because selenium know CLEAR or DELETE Keys is an Charactics Keys not an

Invalid element state: Element must be user-editable in order to clear it error trying to click and insert a date on a dropdown-toggle using Selenium

丶灬走出姿态 提交于 2020-01-14 13:59:15
问题 I'm trying to click on this calendar and insert a date automatically using selenium, but I got the error below: invalid element state: Element must be user-editable in order to clear it. HTML snippet <a id="enddate-dropdown" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target=""> <p class="custom-datepickers__date-prefix ng-binding">To:</p> <!-- ngIf: displayEndDate --> <!-- ngIf: !displayEndDate --><div ng-if="!displayEndDate" class="custom-datepickers__no-date ng-scope"

Invalid element state: Element must be user-editable in order to clear it error trying to click and insert a date on a dropdown-toggle using Selenium

天涯浪子 提交于 2020-01-14 13:57:06
问题 I'm trying to click on this calendar and insert a date automatically using selenium, but I got the error below: invalid element state: Element must be user-editable in order to clear it. HTML snippet <a id="enddate-dropdown" class="dropdown-toggle" role="button" data-toggle="dropdown" data-target=""> <p class="custom-datepickers__date-prefix ng-binding">To:</p> <!-- ngIf: displayEndDate --> <!-- ngIf: !displayEndDate --><div ng-if="!displayEndDate" class="custom-datepickers__no-date ng-scope"