selenium-grid

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

て烟熏妆下的殇ゞ 提交于 2019-12-12 09:01:36
问题 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

RemoteWebDriver and Grid - is it possible to get the server ip?

只愿长相守 提交于 2019-12-12 07:18:07
问题 I am using RemoteWebDriver from Selenium 2 and Grid to divide my tests on several virtual machines. Let's say I have two Linux machines and in a test I specify the capabilities to run on a Linux machine, I can't figure out which of these two machines is being used. Is there any way, to figure it out? Something like driver.getServerIp() or anything else? The reason is, in my Selenium test code I want to start a bash script on the console of the linux machine where the test is being run.

Can I use Selenium Grid to test multiple machines and website but same browser

核能气质少年 提交于 2019-12-12 05:39:15
问题 I have to test multiple machine and each machine have to test different website with same browser. In this case can I use Selenium Grid? If I can't, are there any way to do that? 回答1: Yes you can do it using Grid. I am going to give you a simple example. Create two class of testng and and set the class in testng.xml Now use code in both classes as below:- public class Testing { public static try1 { try{ String baseUrl="https://www.google.com/"; // url on which we have to test String nodeurl=

Selenium remotewebdriver stuck before launching browser

梦想与她 提交于 2019-12-12 04:35:06
问题 I'm trying to launch Firefox remotely on a windows machine from UNIX box using remotewebdriver I am also starting the selenium node remotely using ssh(It starts fine) using Cygwin and OpenSSH. (I've installed firefox in the path c:\cygwin64\home\Administrator\firefox) I am launching the grid node using: java -jar selenium-server-standalone-2.53.0.jar -role node -hub http://HUB_IP:4444/grid/register -port 5566 -Dwebdriver.gecko.driver=geckodriver.exe -Dwebdriver.firefox.bin="firefox/firefox

Opera browser in Selenium grid: Driver class not found

≯℡__Kan透↙ 提交于 2019-12-12 04:33:19
问题 I'm trying to setup an environment with Selenium grid to execute my Selenium test on a remote machine. The only browser I can`t get to work is Opera. I configured it the same as the other browsers. However when I start the node it shows a Driver class not found. I`m Running windows 8.1 Enterprise 64 bit on my host computer The node and the host are on windows 7 Enterprise 32 bit service pack 1 On the host opera is installed, the opera webdriver is in C:/GUI-Tests/Drivers/operadriver.exe, I

Running testng suite on selenium grid and docker

怎甘沉沦 提交于 2019-12-12 04:23:52
问题 I created a Selenium hub and 3 chrome nodes using docker. i can see the 3 chrome instances are up and running in the docker Now how do i stress test a web application. please suggest the steps to run test on selenium grid inside the docker. 回答1: You may start with this simple Python test #!/usr/bin/env python2.7 SELENIUM_HUB = 'http://localhost:4444/wd/hub' from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities driver = webdriver.Remote(

Selenium Webdriver(RemoteWebDriver) can't click anywhere on the webpage

北慕城南 提交于 2019-12-12 04:05:40
问题 I'm learning how to use Selenium Webdriver(RemoteWebDriver) and I'm having some problems with a page I'm training on because I can't click anywhere and I can't locate any element on the webpage. I think the webpage is developed by using Spring or maybe Ajax and that's why I can't get to click anything. This is the url: http://tinyurl.com/d9x453 For example, I'm not capable even to press the first button you can see on the webpage, Am I losing something? Please, I'd really appreciate it If

Selenium2 Servlets

与世无争的帅哥 提交于 2019-12-12 03:17:16
问题 i'd like to add the own servlets by starting of selenium-server-standalone-2.19.0.jar -servlets, but cannot figure out how to do it. is it possible to find the developer's guide about selenium2 servlets? one example would be also very nice. tnx a lot! a working solution of mine: 1) checkout of http://selenium.googlecode.com/svn/tags/selenium-2.19.0 2) created HubServlet which extends from RegistryBasedServlet package org.openqa.grid.web.servlet.alpha; ... public class HubServlet extends

Is it possible to convert a keyword driven framework using Selenium WebDriver to Selenium grid?

梦想的初衷 提交于 2019-12-12 02:12:32
问题 I have developed a selenium keyword driven framework. It uses selenium WebDriver. Now I need to migrate to selenium grid. Can it done? I used Java as the programming language. 回答1: Selenium Grid just provide browsers to run your tests which were written using Selenium WebDriver. Refer to Grid wiki: Grid allows you to : scale by distributing tests on several machines (parallel execution) manage multiple environments from a central point, making it easy to run the tests against a vast

Is the parallel execution possible, without selenium grid?or (only testNG is enough?)

半城伤御伤魂 提交于 2019-12-12 01:54:37
问题 I am beginner in selenium webdriver. so for parallel execution normally we do changes in xml file like parallel="methods" thread-count="3" and my doubt is: Is the parallel execution possible without selenium grid? or only testNG is enough? 回答1: Yes, you may run UI tests in parallel without grid, or using only selenium grid node directly, without hub. Each thread in TestNG will open additional browser window, but you will get unpredictable issues in case when you application will manage all