selenium-firefoxdriver

Selenium 2 Firefox Profile Change Location

 ̄綄美尐妖づ 提交于 2019-12-04 13:38:30
For many weeks now, I have been looking around and I have not seen anything regards to changing the location the Firefox Profile saves to. I am using a specific Firefox profile, however, when the tests run the session is created in /tmp/. I would like the session to start up in a different location and save the files it uses in a location like: /var/tmp/. Is there any way to do this? Note: This is not a question as to where I get the RemoteWebDriver to use a specific Firefox profile. Edit: I am using Selenium 2.28 and Firefox 15.0.1 Look at FirefoxProfile:442 File profileDir =

how to setup selenium python environment for firefox?

对着背影说爱祢 提交于 2019-12-04 06:24:27
How to setup selenium python environment for Firefox? I am using Firefox 50, selenium 3, python 3.5, I tried with many things binary and copying the geckodriver in environment path etc. As far as I understand, you want to develop in python, using selenium library and work with Firefox webdriver. install python (python3 already contains pip) install selenium ( pip install selenium OR some IDEs like PyCharm propose to install libraries, just import selenium) download Mozilla webdriver enjoy! IslamTaha The testing machine should have selenium V. 3.0.2, firefox V. 51.0.1 (Latest version) and

Webdriver selenium,java.lang.NullPointerException,while trying to locate a Webelement

对着背影说爱祢 提交于 2019-12-04 05:28:52
问题 Complete code is written to fetch data from excel and login to Gmail, but while trying to do so my browser had opened and also the desired page got opened and as well as login id was picked from excel and stored in the variable sUsername, but unable to locate the xpath as- element=driver.findElement(by.id("Email")); but when I print element it holds "null", where as expected was some address of the locator id. Further by using the address of id I would had used with sendkeys to enter the

In System.setProperty(“webdriver.gecko.driver”, “<Path to your WebDriver>”), what is meant by “Path to your WebDriver”?

北战南征 提交于 2019-12-04 03:56:33
问题 I have this exception since I upgraded to 3.0 beta with Firefox. Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property 回答1: It seems now we need to manually download and set path to the driver executable for Mozilla Firefox also just like chromedriver. Following is what you need to do:- Go to http://docs.seleniumhq.org/download/ Scroll down to " Third Party Drivers, Bindings, and Plugins "

How to make Firefox open all links opened via WebDriver in the same window?

让人想犯罪 __ 提交于 2019-12-04 00:23:39
问题 I want to open all links in the same window instead in new window. I tried profile.setPreference("browser.link.open_newwindow", 1) but the result is: WARNING: traffic.loop 0 error: Preference browser.link.open_external may not be overridden: frozen value=2, requested value=1 Is there an another way to open the links in the same window ? 回答1: You should modify the firefox profile parameters: profile = webdriver.FirefoxProfile() profile.set_preference("browser.link.open_newwindow", 3) profile

Which Firefox version is compatible with Selenium 3.6.0

你。 提交于 2019-12-03 21:30:24
问题 I would like to update the Selenium version 3.6.0 and I was wondering which is the best version of FF to use if Gecko driver is not used? Any help will be highly appreciated. 回答1: Selenium with Gecko Driver Selenium Release Perspective : Selenium v3.6.0 (Java) Release explicitly didn't mention any dependency explicitly. The last dependency explicitly mentioned by Selenium was for v3.4.0 which is as follows : Geckodriver 0.16 is strongly recommended GeckoDriver Release Perspective :

Python Selenium - What are possible keys in FireFox webdriver profile preferences

时光总嘲笑我的痴心妄想 提交于 2019-12-03 20:37:33
I couldn't really find this information anywhere, I am looking for a list of possible keys that can be used in the profile.set_preference() API. Here is some context: from selenium import webdriver from pyvirtualdisplay import Display display = Display(visible=0, size=(1024, 768)) display.start() profile = webdriver.FirefoxProfile() Now, if I want to, say specify a client SSL, I need to configure that as a preference of FireFox profile. I am trying to find the list of all the preferences so I can play with this. You can look at profile.DEFAULT_PREFERENCES which is the json at python2.7/site

How can I pass a fake media stream to firefox from command line?

孤街浪徒 提交于 2019-12-03 16:39:06
问题 I am developing a java/selenium based application and need to pass media i.e. audio and/or video files to the browser. I have been able to successfully do this in Chrome using the below code snippet: DesiredCapabilities capabilities = DesiredCapabilities.chrome(); ChromeOptions options = new ChromeOptions(); options.addArguments("--allow-file-access-from-files", "--use-fake-ui-for-media-stream", "--allow-file-access", "--use-file-for-fake-audio-capture=D:\\PATH\\TO\\WAV\\xxx.wav", "--use-fake

Firefox WebDriver hangs waiting for page to load

若如初见. 提交于 2019-12-03 12:21:48
问题 sometimes in my test done with Selenium 2.41 and tested with Firefox 28 the execution hangs waiting for page to load. This is the wait condition: int time = 30; WebDriverWait wait = new WebDriverWait(webDriver, time); ExpectedCondition<Boolean> pageLoadCondition = new ExpectedCondition<Boolean>() { public Boolean apply(WebDriver driver) { return ((JavascriptExecutor)driver).executeScript("return document.readyState").equals("complete"); } }; wait.until(pageLoadCondition); It's supposed that

geckodriver.exe not in current directory or path variable, Selenium 2.53.1 + Firefox 48 + Selenium 3 Beta

风格不统一 提交于 2019-12-03 04:26:59
Seen a lot of questions regarding Selenium 2.53.1 and Firefox 47.0.1, but none in regards to the Selenium 3 Beta release. I am attempting to use the new gecko/marionette Firefox webdrivers, but even though I have the driver location in; my environment path, Firefox install folder in programs, and give the drive location in the system environment, it will still not work correctly. Error: The geckodriver.exe 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 . Using: Selenium