selenium-firefoxdriver

Selenium using too much RAM with Firefox

情到浓时终转凉″ 提交于 2019-11-28 13:00:34
I am using selenium with Firefox to automate some tasks on Instagram. It basically goes back and forth between user profiles and notifications page and does tasks based on what it finds. It has one infinite loop that makes sure that the task keeps on going. I have sleep() function every few steps but the memory usage keeps increasing. I have something like this in Python: while(True): expected_conditions() ...doTask() driver.back() expected_conditions() ...doAnotherTask() driver.forward() expected_conditions() I never close the driver because that will slow down the program by a lot as it has

pageLoadTimeout is not working in Selenium - Java

佐手、 提交于 2019-11-28 09:26:53
问题 I am testing a website in linux host.The page i am accessing loads infinitely so I am trying to set pageLoadTimeout for selenium. Firefox is triggered correctly but URL is not loading/navigating/added in url bar.just blank firefox window.I am not seeing any errors also. WebDriver driver = new FirefoxDriver(); driver.manage().timeouts().pageLoadTimeout(2, TimeUnit.SECONDS); driver.get("http://www.example.com"); However if I remove driver.manage().timeouts().pageLoadTimeout(2, TimeUnit.SECONDS)

WebDriverException: Message: newSession with GeckoDriver Firefox v65 and Selenium through Python 3.7

感情迁移 提交于 2019-11-28 02:21:32
I am trying to use Python 3.7 + Selenium + Geckodriver + Firefox v65.0 for scrapping. New window is opening, but Firefox does not sent correct respond about session to Python and crashes after 30 seconds with an error: WebDriverException: Message: newSession In case if I downgrade Firefox to version 60.0.2 - all works correctly with all versions Geckodriver v0.22, 0.23 and 0.24. Firefox version 63.0, 65.0 and 66beta does not work, even if I try different geckodrivers from 0.22 to 0.24. System : Windowns 7 x64+ Firefox 65.0 64bit, newest selenium, geckodriver v0.24.0. My code: from selenium

How to change Firefox web driver proxy settings at runtime?

别说谁变了你拦得住时间么 提交于 2019-11-28 01:10:58
问题 I use Selenium 2.35.0 and configure proxy settings like: DesiredCapabilities cap = new DesiredCapabilities(); org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy(); proxy.setHttpProxy(proxyStr).setFtpProxy(proxyStr).setSslProxy(proxyStr); cap.setCapability(CapabilityType.PROXY, proxy); driver = new FirefoxDriver(firefox, profile, cap); When I need to change proxy settings I force to restart webdriver and speify other "proxyStr". How I can reach this changing without of webdriver

Why does the Selenium Firefox Driver consider my modal not displayed when the parent has overflow:hidden?

感情迁移 提交于 2019-11-28 00:43:04
问题 EDIT: I think there is an issue open on this already: http://code.google.com/p/selenium/issues/detail?id=5717 So basically I'm using the Firefox Driver and the div with id="page-content" is causing my selenium test to fail with the error listed in the referenced question: "Element is not currently visible and so may not be interacted with" but another is? I was able to trace the problem down to the fact that that ID has a css style of overflow: hidden Is this a bug, or am I doing something

how can i remove notifications and alerts from browser? selenium python 2.7.7

血红的双手。 提交于 2019-11-27 21:43:34
I am trying to submit information in a webpage, but selenium throws this error: UnexpectedAlertPresentException: Alert Text: This page is asking you to confirm that you want to leave - data you have entered may not be saved. , > It's not a leave notification; here is a pic of the notification - . If I click in never show this notification again, my action doesn't get saved; is there a way to save it or disable all notifications? edit: I'm using firefox. You can disable the browser notifications, using chrome options. Sample code below: chrome_options = webdriver.ChromeOptions() prefs = {

WebDriver cannot be resolved to a type FirefoxDriver cannot be resolved to a type

时光毁灭记忆、已成空白 提交于 2019-11-27 15:11:48
I found a similar error as mine on stackoverflow and added selenium webdriver jar files to the project using the below method : right click on project--> goto build path--> configure build path--> click on "Add external jars"--> add selenium jar files from your local machine--> click ok--> now mouseover on WebDriver in your code--> click "import webdriver"--now run your code-->you will get rid of the exception. However, I am still getting an error. Here's the error : Exception in thread "main" java.lang.Error: Unresolved compilation problems: WebDriver cannot be resolved to a type

Which Firefox version is compatible with Selenium 2.53.0?

谁说我不能喝 提交于 2019-11-27 14:17:53
Which Firefox version is compatible with Selenium 2.53.0? I tried Firefox 45.0 and I am getting this exception: org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/Applications/Firefox.app/Contents/MacOS/firefox-bin) on port 7055; process output follows: foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"l ocales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"45.0","maxVersion":"45.*"},{"id":"xpcshell@tests.mozilla.org","minVersion":"0","maxVersion":"10"}],"targetPlatforms":[],

Firefox webdriver opens first run page all the time

大城市里の小女人 提交于 2019-11-27 13:26:11
How to disable this "first run" page once and for all for FF? When FF driver is created, it opens tab with - https://www.mozilla.org/en-US/firefox/42.0/firstrun/learnmore/ and additional tab with target page. To turn off this annoying start page: in C# with Selenium 2.48 I found the following solution: FirefoxProfile prof = new FirefoxProfile(); prof.SetPreference("browser.startup.homepage_override.mstone", "ignore"); prof.SetPreference("startup.homepage_welcome_url.additional", "about:blank"); Driver = new FirefoxDriver(prof); ...and it will never bother you again. Note: One of these settings

What are the benefits of using Marionette FirefoxDriver instead of the old Selenium FirefoxDriver for a Selenium tester?

╄→гoц情女王★ 提交于 2019-11-27 12:51:12
Last weeks there has been a lot of noise about this new FirefoxDriver called Marionette. To use Firefox with Selenium, we used to use the "old" Selenium FirefoxDriver. From Firefox 48.0 onwards it is going to be required to use this new FirefoxDriver developed by Mozilla. I understand it is required to change to that direction to get every browser supports and develops its drivers and to get drivers independent of Selenium. Besides, it is supposed if Mozilla develops its own driver, it will be faster and easier to fix issues and to develop features. My question is, for those who create