remotewebdriver

Firefox crashes on close/quit - Pytest Selenium with RemoteWebDriver

[亡魂溺海] 提交于 2019-12-12 00:38:52
问题 I searched and found very similar mentions in older questions from several months ago which seemed to suggest problem should have been fixed by now, but it is still occurring for me. Pytest on my Linux server - Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700' Firefox on my remote Win7 laptop - browserVersion 50.0.2 Geckodriver on my remote Win7 laptop - geckodriver-v0.11.1-win64 . System info: host: 'XXXXXXXXX', ip: 'XXX.XXX.XXX.XXX', os.name: 'Windows 7',

Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; with Remote WebDriver

…衆ロ難τιáo~ 提交于 2019-12-11 06:57:33
问题 When I modified my code to run with RemoteWebDriver and ChromeDriver I am getting: Exception: The path to the driver executable must be set by the webdriver.chrome.driver system property; Code: File file = new File("C:/WebDrivers/chromedriver.exe"); System.setProperty("webdriver.chrome.driver",file.getAbsolutePath()); HashMap<String, Object> chromePrefs = new HashMap<String, Object>(); chromePrefs.put("profile.default_content_settings.popups", 0); chromePrefs.put("download.default_directory",

How to start Selenium RemoteWebDriver or WebDriver without clearing cookies or cache?

旧城冷巷雨未停 提交于 2019-12-09 01:42:47
问题 Use case: Login with a username, navigated to a 2nd factor authentication page to do one of a number of things (i.e. answer a knowledge based question), and then navigated to a final page to enter a password. Close the browser and attempt to login again with the username. This time the 2nd factor authentication page is bypassed because the app recognizes the cookies and the user is prompted to enter their password directly. Problem: I am using Selenium RemoteWebDriver to run these tests on a

PhantomJS Proxy when using Remote Webdriver?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 14:57:08
I am trying to use selenium in python with PhantomJS. I am running a selenium hub server so am using webdriver.Remote to start a webdriver. The normal way to pass a proxy to PhantomJS is: service_args = [ '--proxy=127.0.0.1:9999', '--proxy-type=socks5', ] browser = webdriver.PhantomJS('../path_to/phantomjs',service_args=service_args) This won't workthough for webdriver.Remote(service_args=service_args) As webdriver.Remote takes only desired_capabilities, not service args, as a parameter. Is there any way to pass a proxy to PhantomJS as a desired_capibility? The typical way one would do so with

Selenium remoteWebDriver : connection to selenium-standalone-server fail (driver version unknown)

删除回忆录丶 提交于 2019-12-06 00:06:14
问题 I received an exception after trying to setup a connection to selenium-server-standalone by using remoteWebDriver in an application test written in Java. The issue is related the usage of remoteWebDriver starting selenium-server-standalone (with Xvfb) by using maven (because by running manually by a different session Xvfb and then selenium-server stand alone the application test is working). The environment is composed by RH Linux R4.1.x , Selenium 2.1, firefox 3.6. Both selenium-server

Selenium Grid running tests in parallel

风格不统一 提交于 2019-12-04 19:50:14
Currently, I have a Selenium grid setup, with 1 local hub and 2 local nodes. The hub is capable of distributing the tests to run in parallel and distribute it over to the nodes. I am running the tests in parallel. The following is the base test public abstract class BaseTest { String testFolder; String testName; protected String envName; protected Configuration config; protected String host; protected RemoteWebDriver driver; protected String proxy; protected SomeData someData; protected SomeController someController; public BaseTest() { } public BaseTest( String testFolder, String testName) {

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 =

WebDriver Java: Reattach existing webdriver browser session to a driver instance

夙愿已清 提交于 2019-12-03 21:31:58
I'm looking for a way to reattach an existing webdriver browser session to a driver instance so i could control the browser again. So far, I've tried the following: I. ========================================== Reference: https://stackoverflow.com/a/38827934/2285470 Browser: Firefox v. 51.01 / Chrome v. 56.0.2924.87 Driver: geckodriver v. 0.14 / chromedriver v. 2.27 Solution tried: 1. Create a custom class that extends RemoteWebDriver public class RemoteDriver extends RemoteWebDriver { public RemoteDriver(URL url, String sessionId) { super(); setSessionId(sessionId); setCommandExecutor(new

Using Selenium RemoteWebDriver behind corporate proxy

自闭症网瘾萝莉.ら 提交于 2019-12-03 07:34:20
How can I connect to a selenium grid such as BrowserStack via RemoteWebDriver from behind a corporate proxy? The application under test is outside the proxy and freely accessible from BrowserStack. This Using Selenium RemoteWebDriver behind corporate proxy (Java) stackoverflow question asked the same question but I couldn't follow the accepted answer. I managed to get something working based on the accepted answer in the linked stackoverflow question, here's my implementation in case anyone else is stuck on the same problem: Example import java.net.InetAddress; import java.net

How to provide custom capabilities on the selenium server?

感情迁移 提交于 2019-12-02 16:18:03
问题 I know that some selenium capabilities can be obtained with a method, one of them like this : driver.getCapabilities().getBrowserName(); It returns the value of the browser name. But if it refers to an available method, if I don't misunderstand it, this seems to be related to custom capabilities, like this I mean : driver.getCapabilities().getCapability("something ?"); Returns: The value, or null if not set. So, I've tried to make a simple code to get the value I mean. private RemoteWebDriver