selenium

webdriver-manager update throwing Error: connect ETIMEDOUT

情到浓时终转凉″ 提交于 2021-02-20 19:30:09
问题 I'm getting ETIMEDOUT error while installing webdriver-manager updated . Find the error details as below: C:\Users\....> webdriver-manager update webdriver-manager: using global installed version 12.0.6 events.js:160 throw er; // Unhandled 'error' event ^ Error: connect ETIMEDOUT XX.XXX.XX.XXX:XXX at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14) Also when I tried to ping the

How to change the text of a span that acts like a button

我的未来我决定 提交于 2021-02-20 13:36:37
问题 I am working on writing automation tests for a custom web application. I am running into a problem where I can't change the text of a span. I have tried using driver.execute_script but have had no luck. (It would really help if I knew javascript better) As far as I know you can't click a span and the list is populated as a list of . What is the best way to change this text? 回答1: You need to set the innerHTML using execute_script(): driver.execute_script('arguments[0].innerHTML = "New value";'

How to change the text of a span that acts like a button

女生的网名这么多〃 提交于 2021-02-20 13:29:30
问题 I am working on writing automation tests for a custom web application. I am running into a problem where I can't change the text of a span. I have tried using driver.execute_script but have had no luck. (It would really help if I knew javascript better) As far as I know you can't click a span and the list is populated as a list of . What is the best way to change this text? 回答1: You need to set the innerHTML using execute_script(): driver.execute_script('arguments[0].innerHTML = "New value";'

How to compare to List<WebElement> in webdriver?

北城以北 提交于 2021-02-20 05:20:48
问题 I am trying to automate Dual list Box testing. I want to compare the selected values(left side) vs moved values (into right side list). Here is the code. Select allFromListData = new Select(listData); // values selection allFromListData.selectByIndex(0); allFromListData.selectByVisibleText("Helena"); List<WebElement> selectedList=allFromListData.getAllSelectedOptions(); //clicking on add button for(int i=0;i<selectedList.size();i++) System.out.println(selectedList.get(i).getText());

handling submenu item with webdriver selenium

佐手、 提交于 2021-02-20 03:54:29
问题 I want to click submenu item using selenium webdriver which is invisible bydefault. It becomes visible on mousehover . I tried with some code and it is giving error as shown below Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Element is not currently visible and so may not be interacted with. Here the code: Actions actions = new Actions(driver); WebElement menuHoverLink = driver.findElement(By.linkText("RENT")); //WebElement menuHoverLink = driver.findElement(By

Selenium not going to next page in scraper

江枫思渺然 提交于 2021-02-20 03:51:45
问题 I'm writing my first real scraper and although in general it's been going well, I've hit a wall using Selenium. I can't get it to go to the next page. Below is the head of my code. The output below this is just printing out data in terminal for now and that's all working fine. It just stops scraping at the end of page 1 and shows me my terminal prompt. It never starts on page 2. I would be so grateful if anyone could make a suggestion. I've tried selecting the button at the bottom of the page

Selenium not going to next page in scraper

故事扮演 提交于 2021-02-20 03:51:24
问题 I'm writing my first real scraper and although in general it's been going well, I've hit a wall using Selenium. I can't get it to go to the next page. Below is the head of my code. The output below this is just printing out data in terminal for now and that's all working fine. It just stops scraping at the end of page 1 and shows me my terminal prompt. It never starts on page 2. I would be so grateful if anyone could make a suggestion. I've tried selecting the button at the bottom of the page

Selenium not going to next page in scraper

烂漫一生 提交于 2021-02-20 03:51:22
问题 I'm writing my first real scraper and although in general it's been going well, I've hit a wall using Selenium. I can't get it to go to the next page. Below is the head of my code. The output below this is just printing out data in terminal for now and that's all working fine. It just stops scraping at the end of page 1 and shows me my terminal prompt. It never starts on page 2. I would be so grateful if anyone could make a suggestion. I've tried selecting the button at the bottom of the page

Selenium not going to next page in scraper

走远了吗. 提交于 2021-02-20 03:51:22
问题 I'm writing my first real scraper and although in general it's been going well, I've hit a wall using Selenium. I can't get it to go to the next page. Below is the head of my code. The output below this is just printing out data in terminal for now and that's all working fine. It just stops scraping at the end of page 1 and shows me my terminal prompt. It never starts on page 2. I would be so grateful if anyone could make a suggestion. I've tried selecting the button at the bottom of the page

Selenium driver.get() modifying URL

不羁的心 提交于 2021-02-20 03:50:43
问题 I have a webscraper setup to go through different dates and pull historical stats and save them to a DF. This has worked fine up until today when I tried updating my database. Here is the code: myDate = startDate while myDate < endDate: dateFormat = "{date.month:02}{date.day:02}{date.year}".format(date=myDate) url = "http://www.example.com/?date="+dateFormat driver.get(url) print(url) time.sleep(3) html = driver.page_source So I added the print command just to see what URL it was sending to