selenium-firefoxdriver

Selenium using too much RAM with Firefox

[亡魂溺海] 提交于 2019-11-27 07:17:29
问题 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()

Selenium-Debugging: Element is not clickable at point (X,Y)

若如初见. 提交于 2019-11-27 05:04:37
问题 I try to scrape this site by Selenium. I want to click in "Next Page" buttom, for this I do: driver.find_element_by_class_name('pagination-r').click() it works for many pages but not for all, I got this error WebDriverException: Message: Element is not clickable at point (918, 13). Other element would receive the click: <div class="linkAuchan"></div> always for this page I read this question and I tried this driver.implicitly_wait(10) el = driver.find_element_by_class_name('pagination-r')

How do I recover the “text” from the page originating the alert, esp **after** the human user has *clicked* [dismiss] on the page's **alert**?

拜拜、爱过 提交于 2019-11-27 02:17:22
Basically, when an alert is popped up in javascript, I can dismiss() it from python perfectly OK, by calling selenium.webdriver.common.alert.Alert(browser).dismiss() . However, if the "browser user" dismisses the alert by clicking [OK] (on screen) with their mouse, then the browser alert gets "Lost in Space" the body.text can no longer be accessed from python. So... How do I recover the "text" from the page originating the alert, esp after the human user has clicked [dismiss] on the page's alert ? Here are the hints and a script to demonstrate the problem... FYI: The objective of the

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

我怕爱的太早我们不能终老 提交于 2019-11-26 23:05:46
问题 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. 回答1: You can disable the browser

How to handle download pop-up in firefox, while downloading excel using Selenium Webdriver

元气小坏坏 提交于 2019-11-26 21:43:49
问题 I am trying to download an Excel file from Firefox and Webdriver, but i can't handle the download pop-up. When click on button i need the file to download automatically, without showing pop-up. Here is my code: FirefoxProfile firefoxProfile = new FirefoxProfile(); firefoxProfile.setPreference("browser.download.folderList", 2); firefoxProfile.setPreference("browser.download.manager.showWhenStarting", false); firefoxProfile.setPreference("browser.download.dir", Constant.Downloaded_Path);

How to install extension permanently in geckodriver

旧巷老猫 提交于 2019-11-26 18:35:15
问题 I need to test Firefox using an extension. I want to automate the test and visit several websites. I installed Selenium and it opens in geckodriver . However, the extension is not there. I can install it manually from about:debugging but the problem is that I want the Selenium test to launch the gecko driver while the extension is already there. How to do this? How to install the extension permanently in the geckodriver so it is there when I launch the geckodriver from selenium? EDIT: I also

Why Firefox requires GeckoDriver?

三世轮回 提交于 2019-11-26 18:01:23
Just a simple question I had today: I created a new selenium project with this code: FirefoxDriver driver = new FirefoxDriver(); //ChromeDriver driver = new ChromeDriver(); //InternetExplorerDriver driver = new InternetExplorerDriver(); With Chrome and IE works out of the box, but with Firefox throws: The geckodriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at https://github.com/mozilla/geckodriver/releases . Why only for Firefox do we have to download/configure this driver? DebanjanB Let me try to answer

Which Firefox version is compatible with Selenium 2.53.0?

时光毁灭记忆、已成空白 提交于 2019-11-26 16:39:56
问题 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":

Firefox webdriver opens first run page all the time

半世苍凉 提交于 2019-11-26 16:20:40
问题 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. 回答1: 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

Difference between webdriver.firefox.marionette & webdriver.gecko.driver

邮差的信 提交于 2019-11-26 14:20:45
I am now learning Selenium and have met a problem. I am aware that Selenium supported old Firefox version by default without a driver. And for recent versions of Firefox, we have to download the driver and define it using System.setProperty . According to this link , for Firefox 45 and 46, start driver code could look like this: WebDriver driver = new FirefoxDriver(); My Firefox is version 45.5.1., but above code still won't work. So according to this link , I have added: System.setProperty("webdriver.firefox.marionette","C:\\geckodriver.exe"); And it worked. Then I realized that I haven't