selenium-webdriver

Unable to run javaScript on change Function though Web Scrapping Using Selenium With Java

时光毁灭记忆、已成空白 提交于 2020-08-26 07:19:25
问题 My task: 1)I have to go this url : https://www1.nseindia.com/live_market/dynaContent/live_watch/pre_open_market/pre_open_market.htm 2)Select the option "FO Stocks" from selection box so that New table of FO Stocks will appear. 3)After that Sort the table in decending by click on "FFM Column" which has href table header. Extract Top 5 Rows of the Table. My Approach: Selenium Webdriver using Java 1)I have sucessfully opened the url in FireFox tried with Chrome which is talking to long to load

How to check if a text is highlighted on the page using Selenium?

不问归期 提交于 2020-08-25 09:57:57
问题 1> What does highlighted text means? Suppose you browse any page , select any text on that page using mouse or some other means. Let say " " , "Sign Up "text is highlighted. Please correct my understanding if its wrong. 2> I tried the below code to get CssValue of color and background-color. Using the given code: driver.get("https://facebook.com"); String textColor = driver.findElement(By.xpath("//*[@id='pageFooter']/div[3]/div/span")).getCssValue("color"); String bkgColor = driver

How to check if a text is highlighted on the page using Selenium?

随声附和 提交于 2020-08-25 09:53:45
问题 1> What does highlighted text means? Suppose you browse any page , select any text on that page using mouse or some other means. Let say " " , "Sign Up "text is highlighted. Please correct my understanding if its wrong. 2> I tried the below code to get CssValue of color and background-color. Using the given code: driver.get("https://facebook.com"); String textColor = driver.findElement(By.xpath("//*[@id='pageFooter']/div[3]/div/span")).getCssValue("color"); String bkgColor = driver

How to check if a text is highlighted on the page using Selenium?

可紊 提交于 2020-08-25 09:52:39
问题 1> What does highlighted text means? Suppose you browse any page , select any text on that page using mouse or some other means. Let say " " , "Sign Up "text is highlighted. Please correct my understanding if its wrong. 2> I tried the below code to get CssValue of color and background-color. Using the given code: driver.get("https://facebook.com"); String textColor = driver.findElement(By.xpath("//*[@id='pageFooter']/div[3]/div/span")).getCssValue("color"); String bkgColor = driver

Automating GMAIL login using Python-Selenium

∥☆過路亽.° 提交于 2020-08-24 08:38:06
问题 I am trying to automate logging into GMail using Selenium package of Python. However, I am not able to accomplish the task and get the following error: Traceback (most recent call last): File "C:\Users\Surojit\Desktop\Python\automaticpasswordFiller.py", line 21, in <module> passwordElem = browser.find_element_by_id('Passwd') File "C:\Users\Surojit\AppData\Local\Programs\Python\Python35-32\lib\site- packages\selenium\webdriver\remote\webdriver.py", line 266, in find_element_by_id return self

Selenium - User prompt of type promptUserAndPass is not supported

这一生的挚爱 提交于 2020-08-21 06:35:31
问题 For a long time I've been using a python bot to do some work task. Among others things, the bot has to pass an authentication window. The code of this in the python program is the following: driver = webdriver.Firefox(firefox_profile=profile) ... driver.get('https://example.com') driver.switch_to.alert.send_keys('123456' + Keys.TAB + '123456') driver.switch_to.alert.accept() But yesterday it throwed this error: selenium.common.exceptions.WebDriverException: Message: User prompt of type

What is the difference between SearchContext and WebDriver interfaces in Selenium or what is the relationship between them?

孤街醉人 提交于 2020-08-20 10:51:07
问题 I have seen somewhere we can use both WebDriver driver = new FirefoxDriver() or SearchContext driver = new FirefoxDriver() I am confused what is the difference between these two different interfaces? 回答1: SearchContext SearchContext is an interface which is the runtime container for contextual information for applications search. It contains search related meta information and can hold the reference to an external context that might be useful for the purpose of search as well as security.