selenium-webdriver

pageLoadTimeout not working for Firefox browser in selenium

早过忘川 提交于 2020-03-21 06:38:13
问题 In firefox browser pageLoadTimeout is not working whereas same code is working for chromium browser. public static WebDriver startApplication(WebDriver driver, String browserName, String appURL) { switch (browserName.toLowerCase()) { case "chrome": WebDriverManager.chromedriver().setup(); driver = new ChromeDriver(); break; case "firefox": WebDriverManager.firefoxdriver().setup(); driver = new FirefoxDriver(); break; case "ie": WebDriverManager.iedriver().setup(); driver= new

How to get all the data from any website with just one class in selenium python

让人想犯罪 __ 提交于 2020-03-18 09:18:02
问题 I want to scrape the whole website with selenium. I got one class of a product name in amazon. I just want to get all the product names under one class name. Without manually copying any id's or XPATH's for each and every product. How to do that?? What i have tried with justdial.com which worked: user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) ' \ 'Chrome/80.0.3987.132 Safari/537.36' driver_exe = 'chromedriver' options = ChromeOptions()

How to get all the data from any website with just one class in selenium python

主宰稳场 提交于 2020-03-18 09:16:38
问题 I want to scrape the whole website with selenium. I got one class of a product name in amazon. I just want to get all the product names under one class name. Without manually copying any id's or XPATH's for each and every product. How to do that?? What i have tried with justdial.com which worked: user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) ' \ 'Chrome/80.0.3987.132 Safari/537.36' driver_exe = 'chromedriver' options = ChromeOptions()

Scroll down until elements are found in Python

不打扰是莪最后的温柔 提交于 2020-03-16 15:13:31
问题 So basically i want to make a Facebook script that is going to add all friends from my friends "Friend List", now the problem is we already have a lot of mutual friends (that are shown on the top of the "Friend List"), I want to scroll all the way down until "Add Friend" appears, and once it appears I want the script to click the button and add him everyone else that is not my friend. Now I am pretty new to programming so if you can to explain me more in details how to do this PS: i know that

What information about device does cookie store?

夙愿已清 提交于 2020-03-16 09:52:47
问题 I'm using selenium to collect cookies, and here's the question: does cookies store information about selenium? 回答1: You can check the cookies list by driver.manage().getCookies(); Return type is Set <Cookies>. Hope this will help. 回答2: No , cookies doesn't store information about Selenium . Cookies As per the article Privacy Concerns on Cookies, cookies are harmless. In it's basic form, cookies are simple uncompiled text files that help coordinate the remote website servers and your browser

Getting WebElement by Text using XPath in Selenium test

佐手、 提交于 2020-03-13 06:33:01
问题 I would like to find any WebElement based on text using XPath. WebElement that I am interested to find, Its HTML, Basically my WebElement that I am trying to retrieve by Text contains an input element. I currently use, driver.findElement(By.xpath("//*[normalize-space(text()) = 'Own Hotel']")); which does not find the WebElement above, but it usually works to retrieve all other web elements. Even, By.xpath("//*[contains(text(),'Own Hotel')]") did not give me any results. Although I am

Getting WebElement by Text using XPath in Selenium test

无人久伴 提交于 2020-03-13 06:32:09
问题 I would like to find any WebElement based on text using XPath. WebElement that I am interested to find, Its HTML, Basically my WebElement that I am trying to retrieve by Text contains an input element. I currently use, driver.findElement(By.xpath("//*[normalize-space(text()) = 'Own Hotel']")); which does not find the WebElement above, but it usually works to retrieve all other web elements. Even, By.xpath("//*[contains(text(),'Own Hotel')]") did not give me any results. Although I am

org.openqa.selenium.NoSuchWindowException: Unable to get browser while trying to open Internet Explorer 11 through Selenium and IEDriverServer

耗尽温柔 提交于 2020-03-11 14:53:08
问题 I'm unable to launch Internet Explorer browser with the selenium webdriver. Facing the below error, can anyone please help Error occured: Started InternetExplorerDriver server (32-bit) 3.14.0.0 Listening on port 45640 Only local connections are allowed Aug 06, 2019 3:32:27 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C Exception in thread "main" org.openqa.selenium.NoSuchWindowException: Unable to get browser Build info: version: '3.141.59', revision

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81

∥☆過路亽.° 提交于 2020-03-10 05:05:12
问题 I am currently new to robot framework.I am currently using latest window version of chrome and chromedriver which is 80 but when i try to run the test it gives the message "SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81" in pycharm but currently beta version of 81 is only available. I have tried uninstalling everthing and reinstalling it again but nothing works can anyone help me with this.Thank you! Screenshots below:

Unable to get Chrome Performance logs in Selenium C#

喜你入骨 提交于 2020-03-06 09:54:47
问题 I am using following nuget packages in my solution Selenium.WebDriver - v3.141.0 Selenium.WebDriver.ChromeDriver - v79.0.3945.3600 using following code I am creating a Chrome driver instance ChromeOptions options = new ChromeOptions(); //Get Performance Logs from Network tab ChromePerformanceLoggingPreferences perfLogPrefs = new ChromePerformanceLoggingPreferences(); options.PerformanceLoggingPreferences = perfLogPrefs; options.SetLoggingPreference("performance", LogLevel.All); (or)