webdriverwait

Selenium invisibilityOf(element) method throwing NoSuchElementException + WebDriverWait.ignoring(NoSuchElementException.class) is not working

◇◆丶佛笑我妖孽 提交于 2020-01-30 11:42:44
问题 This query consists of 2 related questions. I need to wait for an element to be invisible before I go to next step, hence I tried to define a custom method as below: public void waitToDisappear(long timeOutInSeconds, WebElement element) { WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); wait.ignoring(org.openqa.selenium.NoSuchElementException.class); wait.until(ExpectedConditions.invisibilityOf(element)); } When I call this method as common.waitToDisappear(5, <WebElement>); ,

Selenium invisibilityOf(element) method throwing NoSuchElementException + WebDriverWait.ignoring(NoSuchElementException.class) is not working

北城以北 提交于 2020-01-30 11:41:10
问题 This query consists of 2 related questions. I need to wait for an element to be invisible before I go to next step, hence I tried to define a custom method as below: public void waitToDisappear(long timeOutInSeconds, WebElement element) { WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds); wait.ignoring(org.openqa.selenium.NoSuchElementException.class); wait.until(ExpectedConditions.invisibilityOf(element)); } When I call this method as common.waitToDisappear(5, <WebElement>); ,

How to send text to the Password field within https://mail.protonmail.com registration page?

∥☆過路亽.° 提交于 2020-01-30 10:11:11
问题 I make proton signup form but it's not typing a password It's doing all good its typing username but it's not typing a password It's typing username but it's not typing password. Code trials: '''python from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("start-maximized") # chrome

How to get text of an element on the basis of other element's text value on the same row in the table?

纵饮孤独 提交于 2020-01-30 08:12:28
问题 I need to find the text of an element "score" on the basis of other element "SF Lead ID" on the same row. "SF Lead ID" can be dynamic. for example am using hard coded value here. String sf_id = "00Q1l000003clVhEAI"; //this value is dynamic String text= dvr.findElement(By.xpath("//*/tr/[contains(text(),'" + sf_id + "')]//*[@id='lead-score']")).getText(); Please look the html structure on the above image. help me to correct the xpath. Currently its throwing below error - org.openqa.selenium

How to get text of an element on the basis of other element's text value on the same row in the table?

橙三吉。 提交于 2020-01-30 08:12:08
问题 I need to find the text of an element "score" on the basis of other element "SF Lead ID" on the same row. "SF Lead ID" can be dynamic. for example am using hard coded value here. String sf_id = "00Q1l000003clVhEAI"; //this value is dynamic String text= dvr.findElement(By.xpath("//*/tr/[contains(text(),'" + sf_id + "')]//*[@id='lead-score']")).getText(); Please look the html structure on the above image. help me to correct the xpath. Currently its throwing below error - org.openqa.selenium

How to get text of an element on the basis of other element's text value on the same row in the table?

久未见 提交于 2020-01-30 08:12:06
问题 I need to find the text of an element "score" on the basis of other element "SF Lead ID" on the same row. "SF Lead ID" can be dynamic. for example am using hard coded value here. String sf_id = "00Q1l000003clVhEAI"; //this value is dynamic String text= dvr.findElement(By.xpath("//*/tr/[contains(text(),'" + sf_id + "')]//*[@id='lead-score']")).getText(); Please look the html structure on the above image. help me to correct the xpath. Currently its throwing below error - org.openqa.selenium

How to mouse hover a parent element and subsequently click on child element using Selenium and Action class

早过忘川 提交于 2020-01-30 05:17:52
问题 I wrote a test to hover mouse on an Element which has a link underneath it and to click the subElement. I keep getting NullPointerException. It had work previously and stopped working again. Actions mouseHover = new Actions(driver); mouseHover.moveToElement(ParentElement); mouseHover.moveToElement(subElement); mouseHover.click(subElement); 回答1: As per your code attempts you havn't invoked the perform() method for Mouse Hover . You need to induce WebDriverWait for the elements and can use the

How to scroll down on my page through Selenium and Python?

 ̄綄美尐妖づ 提交于 2020-01-29 21:29:33
问题 Trying to scroll down to the bottom of the page https://silpo.ua/offers/?categoryId=13 but there is no result (no movements) My code: import bs4 from selenium import webdriver from selenium.webdriver.common.keys import Keys import time URL = "https://silpo.ua/offers/?categoryId=13" driver = webdriver.Firefox() driver.get(URL) page = driver.find_element_by_tag_name("html") page.send_keys(Keys.PAGE_DOWN) html = driver.page_source 回答1: There are several approaches to scroll down to the bottom of

How to select an option from a dropdown of non select tag?

半腔热情 提交于 2020-01-26 04:33:17
问题 I am trying to select a value from a dropdown menu. I tried a lot of solutions found here but nothing work, sometimes I have the error can't scroll to view. Code trials: import time from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.select import Select from selenium.webdriver.common.action_chains import ActionChains

How to select an option from a dropdown of non select tag?

好久不见. 提交于 2020-01-26 04:33:04
问题 I am trying to select a value from a dropdown menu. I tried a lot of solutions found here but nothing work, sometimes I have the error can't scroll to view. Code trials: import time from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.select import Select from selenium.webdriver.common.action_chains import ActionChains