webdriver

Selenium how to manage wait for page load?

China☆狼群 提交于 2021-01-30 09:11:12
问题 I am developing web crawlers for a while and the most common issue for me is waiting for page to be completely loaded, includes requests, frames, scripts. I mean completely done. I used several methods to fix it but when I use more than one thread to crawl websites I always get this kind of problem. the Driver opens itself, goes through the URL, doesn't wait and goes through the next URL. My tries are: JavascriptExecutor js = (JavascriptExecutor) driver.getWebDriver(); String result = js

Selenium how to manage wait for page load?

时间秒杀一切 提交于 2021-01-30 09:11:04
问题 I am developing web crawlers for a while and the most common issue for me is waiting for page to be completely loaded, includes requests, frames, scripts. I mean completely done. I used several methods to fix it but when I use more than one thread to crawl websites I always get this kind of problem. the Driver opens itself, goes through the URL, doesn't wait and goes through the next URL. My tries are: JavascriptExecutor js = (JavascriptExecutor) driver.getWebDriver(); String result = js

Selenium how to manage wait for page load?

会有一股神秘感。 提交于 2021-01-30 09:09:00
问题 I am developing web crawlers for a while and the most common issue for me is waiting for page to be completely loaded, includes requests, frames, scripts. I mean completely done. I used several methods to fix it but when I use more than one thread to crawl websites I always get this kind of problem. the Driver opens itself, goes through the URL, doesn't wait and goes through the next URL. My tries are: JavascriptExecutor js = (JavascriptExecutor) driver.getWebDriver(); String result = js

Selenium how to manage wait for page load?

戏子无情 提交于 2021-01-30 09:08:47
问题 I am developing web crawlers for a while and the most common issue for me is waiting for page to be completely loaded, includes requests, frames, scripts. I mean completely done. I used several methods to fix it but when I use more than one thread to crawl websites I always get this kind of problem. the Driver opens itself, goes through the URL, doesn't wait and goes through the next URL. My tries are: JavascriptExecutor js = (JavascriptExecutor) driver.getWebDriver(); String result = js

What is the exact purpose of Selenium Grid?

人走茶凉 提交于 2021-01-29 22:40:31
问题 I am new to Selenium, TestNG and Selenium Grid. I got slightly confused about when exactly I need to use Selenium Grid. Below are my understandings on this. Just let me know if i am right : Selenium Grid is only for running your tests remotely on another machine If I need to run my tests parallelly in my local Machine, there is no need to use Grid. That can be achieved by using TestNG only If I need to execute my test, parallelly on different remote machines, Then i have to use selenium Grid

How does chrome driver interact with Chrome browser?

淺唱寂寞╮ 提交于 2021-01-29 22:10:21
问题 It says ChromeDriver is a standalone server that implements the W3C WebDriver standard It looks like W3C WebDriver standard only defines the interface between the automation program and Chromedriver. Chromedriver act as a HTTP server to get the command from automation program. But how does ChromeDriver communicate with Chrome? Still through HTTP protocol? If yes, where could we get the documentation about the details? And what component inside of Chrome is in charge of handling the command

How does chrome driver interact with Chrome browser?

假如想象 提交于 2021-01-29 21:12:43
问题 It says ChromeDriver is a standalone server that implements the W3C WebDriver standard It looks like W3C WebDriver standard only defines the interface between the automation program and Chromedriver. Chromedriver act as a HTTP server to get the command from automation program. But how does ChromeDriver communicate with Chrome? Still through HTTP protocol? If yes, where could we get the documentation about the details? And what component inside of Chrome is in charge of handling the command

What is the return type of executeScript() method of JavascriptExecutor?

空扰寡人 提交于 2021-01-29 12:06:49
问题 If a JavaScript on a web page return non-decimal value then what will javascriptExecuter.executeScript() will return? Ccan anyone answer this question? 回答1: executeScript() executeScript() executes a JavaScript in the context of the currently selected frame or window. The script fragment provided will be executed as the body of an anonymous function. If the script has a return value (i.e. if the script contains a return statement), then the following type of objects are returned: For an HTML

Unresolved import selenium in python

好久不见. 提交于 2021-01-29 11:22:53
问题 I have just downloaded Visual Studio Code and tried to run some Python code. However, when I try to import Seleinum I receive the following error: from selenium import webdriver from selenium.webdriver.common.keys import Keys Erros: module selenium unresolved import 'selenium'Python(unresolved-import) unresolved import 'selenium.webdriver.common.keys' Python(unresolved-import) Any idea how to make it work? 回答1: The links below address the issue you are having. Your workspace settings are

Close browser popup in Selenium Python

佐手、 提交于 2021-01-29 08:51:17
问题 I am scraping a page using Selenium, Python. On opening the page one Popup appears. I want to close this popup anyway. I tried as below: url = https://shopping.rochebros.com/shop/categories/37 browser = webdriver.Chrome(executable_path=chromedriver, options=options) browser.get(url) browser.find_element_by_xpath("//button[@class='click' and @id='shopping-selector-parent-process-modal-close-click']").click() I tried a couple of similar posts here but nothing is working with me. below the error