selenium-grid

Selenium hangs when launching Firefox on Ubuntu

邮差的信 提交于 2019-12-05 00:58:41
My end goal is to have Selenium running 'within' Jenkins. My Jenkins installation runs within an Ubuntu virtual machine. After some issues with the jenkins selenium setup (stemming from permissions for the user that jenkins runs under) I switched to running the command from the command line to see what was happening. My aim is to get the test running here, and then to get it working within Jenkins. Here's the command and responses I'm currently using and seeing. resn@resn-VirtualBox:~$ sudo java -jar /var/lib/jenkins/tools/selenium/selenium-server.jar -htmlSuite *firefox http://google.com "

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) {

How to change the default download directory with IE (Internet Explorer 11)

ぐ巨炮叔叔 提交于 2019-12-04 19:41:16
问题 In this post I see the solutions for setting the download directories for Chrome and Firefox how to change file download location in Webdriver while using chrome driver/firefox driver These worked perfect for me (the accepted answer that is), however searching around I cannot find any information on doing this with Internet Explorer 11. Does anyone know where I can find this information? 回答1: According to this answer from Jim Evans, who is heavily involved with WebDriver for Internet Explorer

Selenium grid and Jenkins configuration

我的梦境 提交于 2019-12-04 19:32:07
I have downloaded Selenium Grid plugin for Jenkins, and I have two nodes running: java -jar selenium-server-standalone-2.41.0.jar -role node -hub http://jenkins.bla.bla.com:4444/grid/register . In Jenkins, in Selenium Grid tab I can see the two nodes connected: http://xxx.xxx.xx.xxx:5555 (*firefox 5/5, *googlechrome 5/5, *iexplore 1/1, chrome 5/5, firefox 5/5, internet explorer 1/1) http://xxx.xxx.xx.xxx:5555 (*firefox 5/5, *googlechrome 5/5, *iexplore 1/1, chrome 5/5, firefox 5/5, internet explorer 1/1) When I try to build my project, nothing happens, because jenkins doesn't find any

How to use selenium to open multiple instances Firefox simultaneously without clearing cache and cookie

心不动则不痛 提交于 2019-12-04 18:14:15
I have a code which scrape friend list from Facebook UID. It worked but it takes a long time to scrape a whole list. So, I want to speed it up by using multiprocessing and Selenium Grid. The following is the approach I use: Login Facebook with account Open 5 instances Firefox with same cache and cookie ( so I don't need to login again) Scrape friend list from 5 different UID simultaneously. 1 instance/1 UID This is my code but it doesn't work import multiprocessing from selenium.common.exceptions import TimeoutException from bs4 import BeautifulSoup from selenium import webdriver def friend

Connection refused when phantomjs is run on different machine than selenium hub

一曲冷凌霜 提交于 2019-12-04 17:52:28
Is it possible to have a selenium hub on one machine and an instance of phantomjs on a different computer that connects to the hub in the same manner as a selenium node? If I start a selenum hub and an instance of phantomjs on the same machine, I can successfully run tests. If I start a selenium hub and start a selenium node a different machine and run a test with firefox, the test is executed successfully. If I start a selenium hub and an instance of phantomjs on a different machine, phantomjs will successfully connect to the hub but refuses the connection when the hub tries to send a test.

selenium grid with cucumber

被刻印的时光 ゝ 提交于 2019-12-04 16:05:09
I am trying to setup selenium grid to achieve parallel execution of my tests. First, I'll explain the my current scenario. I have my fully functional test suite written in cucumber with watir webdriver I need to execute all my tests in multiple environments. I created a setup for selenium hub and node I can run my tests on a single node through hub My goal is to run my tests on multiple vm's simultaneously. I missing a part where I need to configure my tests to run in parallel. there are some examples about grid setup in the web, as I am using different framework I couldn't relate to my

How to run multiple browsers on one hub using Selenium Grid2

◇◆丶佛笑我妖孽 提交于 2019-12-04 15:49:57
问题 I'm running a test: DesiredCapabilities capability = DesiredCapabilities.Firefox(); IWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), capability); ISelenium selenium = new WebDriverBackedSelenium(driver, "http://localhost/"); selenium.Start(); This runs the Firefox browser, and in the http://localhost:4444/grid/console web console view I can see that one Firefox browser is running. How can I use more than one browser on the node in parallel? I'm using the Grid2

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 =

Executing tests Concurrently on different OS and Browsers with WebDriver using Java and TestNG

怎甘沉沦 提交于 2019-12-04 11:48:37
问题 I have configured grid in my system and written my test script. I can run my test on any specified OS and any Browser but only on one OS and one Browser at one time not all OS and all Browser simultaneously. Here is what I have done. Please tell me how can I configure it so that it can run in configured OS in one time. My Script using Java is below: import java.net.MalformedURLException; import java.net.URL; import org.junit.AfterClass; import org.openqa.selenium.*; import org.openqa.selenium