Search Results

Search found 3885 results on 156 pages for 'selenium ide'.

Page 1/156 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Naming selenium grid nodes. Spawning a specific node

    - by ???? ????
    I'm trying to implement a kind of default queues in selenium hub. There is a possibility to specify node's name (actually its environment, smth like "firefox on ubuntu" or "chrome on windows"). Selenium grid itself has a default queue, it works according to 'First In, First Out' principle. But I want to prioritize some of my tasks given to selenium server. I have no possibility to introduce custom queue (seems like there is no API for that), that's why I decided to separate queue's logic from selenium server. I'll only call a specific node with specific name (environment) for example "firefox important node" or smth like that. So, I want to know how to directly tell selenium which node to use for my task? And generally, am I thinking in a right way? Here are my configs: hubConfig.json.erb { "host": null, "port": <%= node[:selenium][:server][:port] %>, "newSessionWaitTimeout": -1, "servlets" : [], "prioritizer": null, "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher", "throwOnCapabilityNotPresent": true, "nodePolling": <%= node[:selenium][:server][:node_polling] %>, "cleanUpCycle": <%= node[:selenium][:server][:cleanup_cycle] %>, "timeout": <%= node[:selenium][:server][:timeout] %>, "browserTimeout": 0, "maxSession": <%= node[:selenium][:server][:max_session] %> } nodeConfig.json.erb { "capabilities": [ { "browserName": "firefox", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "chrome", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "phantomjs", "maxInstances": 5, "seleniumProtocol": "WebDriver" } ], "configuration": { "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": <%= node[:selenium][:node][:max_session] %>, "port": <%= node[:selenium][:node][:port] %>, "host": "<%= node[:fqdn] %>", "register": true, "registerCycle": <%= node[:selenium][:node][:register_cycle] %>, "hubPort": <%= node[:selenium][:server][:port] %> } } And my Driver class: ... def remote_driver @browser = Watir::Browser.new(:remote, :url => "http://myhub.com:4444/wd/hub", :http_client => client, :desired_capabilities => capabilities ) end def capabilities Selenium::WebDriver::Remote::Capabilities.send( "firefox", :javascript_enabled => true, :css_selectors_enabled => true, :takes_screenshot => true ) end def client client = Selenium::WebDriver::Remote::Http::Default.new client.timeout = 360 client end ... I still don't know how to use specified node for my task. If I try to start a driver adding :name => "firefox important node" and extend nodeConfig.json.erb's configuration with environments: - name: "firefox important node" browser: "*firefox" - name: "Firefox36 on Linux" browser: "*firefox" selenium just starts random firefox browser on a random node. How can I control it?

    Read the article

  • unable to run Selenium webdriver in windows - Permission denied - bind(2) (Errno::EACCES)

    - by mrd abd
    I want to start Selenium web driver in Windows 7 with Ruby 2. but i get error Permission denied - bind(2) (Errno::EACCES) Even in running with Administrator permission. here is my simple ruby code: require "selenium-webdriver" driver = Selenium::WebDriver.for :firefox driver.navigate.to "http://google.com" element = driver.find_element(:name, 'q') element.send_keys "Hello WebDriver!" element.submit puts driver.title driver.quit and here is the error: E:\ruby\930305\Studio\Ruby\test>ruby selenium.rb C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/w ebdriver/common/port_prober.rb:28:in `initialize': Permission denied - bind(2) (Errno::EACCES) from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:28:in `new' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:28:in `block in free?' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:26:in `each' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:26:in `free?' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/port_prober.rb:5:in `above' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/launcher.rb:49:in `find_free_port' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/launcher.rb:33:in `block in launch' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/socket_lock.rb:20:in `locked' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/launcher.rb:32:in `launch' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/firefox/bridge.rb:24:in `initialize' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:31:in `new' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/driver.rb:31:in `for' from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver.rb:67:in `for' from selenium.rb:3:in `<main>'

    Read the article

  • Selenium - Could not start Selenium session: Failed to start new browser session: Error while launching browser

    - by Yatendra Goel
    I am new to Selenium. I generated my first java selenium test case and it has compiled successfully. But when I run that test I got the following RuntimeException java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser at com.thoughtworks.selenium.DefaultSelenium.start <DefaultSelenium.java:88> Kindly tell me how can I fix this error. This is the java file I want to run. import com.thoughtworks.selenium.*; import java.util.regex.Pattern; import junit.framework.*; public class orkut extends SeleneseTestCase { public void setUp() throws Exception { setUp("https://www.google.com/", "*chrome"); } public void testOrkut() throws Exception { selenium.setTimeout("10000"); selenium.open("/accounts/ServiceLogin?service=orkut&hl=en-US&rm=false&continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin%3Fmsg%3D0&cd=IN&skipvpage=true&sendvemail=false"); selenium.type("Email", "username"); selenium.type("Passwd", "password"); selenium.click("signIn"); selenium.selectFrame("orkutFrame"); selenium.click("link=Communities"); selenium.waitForPageToLoad("10000"); } public static Test suite() { return new TestSuite(orkut.class); } public void tearDown(){ selenium.stop(); } public static void main(String args[]) { junit.textui.TestRunner.run(suite()); } } I first started the selenium server through the command prompt and then execute the above java file through another command prompt. Second Question: Can I do right click on a specified place on a webpage with selenium.

    Read the article

  • Selenium error on Win7

    - by hawkeye
    I'm starting Selenium server with the following on a command line: java -jar selenium-server.jar Here is the code: import com.thoughtworks.selenium.*; import java.util.regex.Pattern; import org.openqa.selenium.server.SeleniumServer; import junit.framework.*; public class orkut extends SeleneseTestCase { public void setUp() throws Exception { //SeleniumServer server = new SeleniumServer(); //server.start(); setUp("https://www.google.com/", "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe"); } public void testOrkut() throws Exception { selenium.setTimeout("10000"); selenium.open("/accounts/ServiceLogin?service=orkut&hl=en-US&rm=false&continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin%3Fmsg%3D0&cd=IN&skipvpage=true&sendvemail=false"); selenium.type("Email", "username"); selenium.type("Passwd", "password"); selenium.click("signIn"); selenium.selectFrame("orkutFrame"); selenium.click("link=Communities"); selenium.waitForPageToLoad("10000"); } public static Test suite() { return new TestSuite(orkut.class); } public void tearDown(){ selenium.stop(); } public static void main(String args[]) { junit.textui.TestRunner.run(suite()); } } Here is the error: .E Time: 33.386 There was 1 error: 1) testOrkut(orkut)java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Unable to delete file C:\Users\user\AppData\Local\Temp\customProfileDir78cf02e3efca4772a71525c4a7523cac\parent.lock at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89) at com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:123) at com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:104) at com.thoughtworks.selenium.SeleneseTestCase.setUp(SeleneseTestCase.java:78) at orkut.setUp(orkut.java:14) at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:212) at orkut.main(orkut.java:37) Caused by: com.thoughtworks.selenium.SeleniumException: Failed to start new browser session: Unable to delete file C:\Users\M022534\AppData\Local\Temp\customProfileDir78cf02e3efca4772a71525c4a7523cac\parent.lock at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91) at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:262) at com.thoughtworks.selenium.HttpCommandProcessor.start(HttpCommandProcessor.java:223) at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:81) ... 16 more FAILURES!!! Tests run: 1, Failures: 0, Errors: 1

    Read the article

  • Selenium IDE - Passing a URL string variable into a conditional 'gotoIf' statement throws a Syntax e

    - by user318568
    I am trying to store the current url (http://example.com)in a variable and compare it with another string as a condition in the gotoIf command (part of the gotoIf extension.js): storeLocation || url gotoIf || ${url}=="http://example.com" || label When I run this seleniun ide throws this error: [error] Unexpected Exception: message -> syntax error, fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/Users/David%20Cunningham/Desktop/extensions_js/extensions.js, lineNumber -> 183, stack -> eval("http://example.com==\"http://example.com\"")@:0 ("http://example.com==\"http://example.com\"","label1")@chrome://selenium-ide/content/tools.js -> file:///C:/Users/David%20Cunningham/Desktop/extensions_js/extensions.js:183 ("http://example.com==\"http://example.com\"","label1")@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium/scripts/selenium-commandhandlers.js:310 ()@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:112 (6)@chrome://selenium-ide/content/selenium/scripts/selenium-executionloop.js:78 (6)@chrome://selenium-ide/content/selenium/scripts/htmlutils.js:60 , name -> SyntaxError storeLocation should return a String so why am i getting this error, what is wrong with the syntax and how do I declare this command?

    Read the article

  • PHPUnit Selenium captureScreenshotOnFailure does not work?

    - by user342775
    I am using PHPUnit 3.4.12 to drive my selenium tests. I'd like to be able to get a screenshot taken automatically when a test fails. This should be supported as explained at http://www.phpunit.de/manual/current/en/selenium.html#selenium.seleniumtestcase.examples.WebTest2.php class WebTest { protected $captureScreenshotOnFailure = true; protected $screenshotPath = 'C:\selenium'; protected $screnshotUrl = 'http://localhost/screenshots'; public function testLandingPage($selenium) { $selenium->open("http://www.example.com"); $selenium->fail("fail"); ... } } As you can see, I am making the test to fail and in theory when it does it should take a screenshot and put it in C:\selenium, as I am running the selenium RC server on Windows. However, when I run the test it will just give me the following: [root@testbox selenium]$ sh run PHPUnit 3.4.12 by Sebastian Bergmann. F Time: 8 seconds, Memory: 5.50Mb There was 1 failure: 1) WebTest::testLandingPage fail /home/root/selenium/WebTest.php:32 FAILURES! Tests: 1, Assertions: 0, Failures: 1. I do not see any screenshot in C:\selenium. I can however get a screenshot with $selenium-captureScreenshot("C:/selenium/image.png"); Any ideas or suggestions most welcome. Thanks

    Read the article

  • Trying to run Selenium tests using Hudson - "Error: no display specified"

    - by tputkonen
    I'm trying to get Selenium tests to work when they are executed by Hudson, but I have not been successful so far. Hudson is running on Ubuntu, and Selenium is unable to open display. Command I use for launching the build is: mvn clean selenium:xvfb install error log: [INFO] [selenium:xvfb {execution: default-cli}] [INFO] Starting Xvfb... [INFO] Using display: :20 [INFO] Using Xauthority file: /tmp/Xvfb4467650583214148352.Xauthority Deleting: /tmp/Xvfb4467650583214148352.Xauthority xauth: creating new authority file /tmp/Xvfb4467650583214148352.Xauthority Created dir: /var/lib/hudson/jobs/Selenium/workspace/selenium/target/selenium Launching Xvfb Waiting for Xvfb... [INFO] Redirecting output to: /var/lib/hudson/jobs/Selenium/workspace/selenium/target/selenium/xvfb.log Xvfb started ... [INFO] [selenium:start-server {execution: start}] Launching Selenium Server Waiting for Selenium Server... [INFO] Including display properties from: /var/lib/hudson/jobs/Selenium/workspace/selenium/target/selenium/display.properties [INFO] Redirecting output to: /var/lib/hudson/jobs/Selenium/workspace/selenium/target/selenium/server.log [INFO] User extensions: /var/lib/hudson/jobs/Selenium/workspace/selenium/target/selenium/user-extensions.js Selenium Server started [INFO] [selenium:selenese {execution: run-selenium}] [INFO] Results will go to: /var/lib/hudson/jobs/Selenium/workspace/selenium/target/results-firefox-suite.html ... <~30 seconds pause> ... Error: no display specified ... pom.xml: <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <version>1.0.1</version> <executions> <execution> <id>start</id> <phase>pre-integration-test</phase> <goals> <goal>start-server</goal> </goals> <configuration> <logOutput>true</logOutput> <background>true</background> <port>5123</port> </configuration> </execution> <execution> <id>run-selenium</id> <phase>integration-test</phase> <goals> <goal>selenese</goal> </goals> </execution> <execution> <id>stop</id> <phase>post-integration-test</phase> <goals> <goal>stop-server</goal> </goals> </execution> </executions> <configuration> <browser>*firefox</browser> <suite>src/test/selenium/suite.html</suite> <startURL>http://localhost:${env.port}</startURL> </configuration> I've also tried to get it working by adding execution for xvfb, but also it failed.

    Read the article

  • Selenium Testing

    - by Joakim
    Hi I want to get a bunch of dom-objects with xpath and loop through those to check if they contains a specified text, is this possible in the Selenium IDE or rc? Perl is my prefered language XPath would be something like xpath=//tbody[@class='table-data']/tr/td/div[@class='table-item'] This would return all row items in the table, but i need to check each div if contains a specified text string. Is this possible with Selenium? Best regards

    Read the article

  • How to Select Items in Dropdown in Selenium

    - by Marcus Gladir
    Firstly, I have been trying to get the dropdown from this web page: http://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_Z7_RJH9U5230O73D0ISNF9B3C3SI1000000_nid=RFCNF5FK7WitWK7G49LP38glNZJXPCDXLDbl This is the code I have: import urllib2 from bs4 import BeautifulSoup import re from pprint import pprint import sys from selenium import common from selenium import webdriver import selenium.webdriver.support.ui as ui from boto.s3.key import Key import requests url = 'http://solutions.3m.com/wps/portal/3M/en_US/Interconnect/Home/Products/ProductCatalog/Catalog/?PC_Z7_RJH9U5230O73D0ISNF9B3C3SI1000000_nid=RFCNF5FK7WitWK7G49LP38glNZJXPCDXLDbl' element_xpath = '//*[@id="Component1"]' driver = webdriver.PhantomJS() driver.get(url) element = driver.find_element_by_xpath(element_xpath) element_xpath = '/option[@value="02"]' all_options = element.find_elements_by_tag_name("option") for option in all_options: print("Value is: %s" % option.get_attribute("value")) option.click() source = driver.page_source.encode('utf-8', 'ignore') driver.quit() source = str(source) soup = BeautifulSoup(source, 'html.parser') print soup What prints out is this: Traceback (most recent call last): File "../../../../test.py", line 58, in <module> Value is: XX main() File "../../../../test.py", line 46, in main option.click() File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 54, in click self._execute(Command.CLICK_ELEMENT) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webelement.py", line 228, in _execute return self._parent.execute(command, params) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 165, in execute self.error_handler.check_response(response) File "/home/eric/dev/octocrawler-env/local/lib/python2.7/site-packages/selenium-2.33.0-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 158, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotVisibleException: Message: u'{"errorMessage":"Element is not currently visible and may not be manipulated","request":{"headers":{"Accept":"application/json","Accept-Encoding":"identity","Connection":"close","Content-Length":"81","Content-Type":"application/json;charset=UTF-8","Host":"127.0.0.1:51413","User-Agent":"Python-urllib/2.7"},"httpVersion":"1.1","method":"POST","post":"{\\"sessionId\\": \\"30e4fd50-f0e4-11e3-8685-6983e831d856\\", \\"id\\": \\":wdc:1402434863875\\"}","url":"/click","urlParsed":{"anchor":"","query":"","file":"click","directory":"/","path":"/click","relative":"/click","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/click","queryKey":{},"chunks":["click"]},"urlOriginal":"/session/30e4fd50-f0e4-11e3-8685-6983e831d856/element/%3Awdc%3A1402434863875/click"}}' ; Screenshot: available via screen And the weirdest most infuriating bit of it all is that sometimes it actually all works out. I have no clue what's going on here.

    Read the article

  • Selenium RC 403 Error - Forbidden for proxy

    - by FarmBoy
    I'm trying to run Selenium RC 1.0.3 using Java 6, JUnit 4, and Eclipse on Snow Leopard. Here is my test class, from the Selenium docs: public class TestCase extends SeleneseTestCase { @Before public void before() throws Exception { setUp("http://www.google.com/", "*firefox"); } @Test public void test() { selenium.open("/"); selenium.type("q", "selenium rc"); selenium.click("btnG"); selenium.waitForPageToLoad("30000"); assertTrue(selenium.isTextPresent("Advanced search")); } } I've tried (finding various suggestions on the web) replacing *firefox with *chrome or *firefox, replacing http with https and adding selenium.start(), but none have helped, or even changed the behavior. Any ideas?

    Read the article

  • Selenium tests not building due to NUnit error (Mono+OS X)

    - by Jem
    I'm running Selenium RC on my Mac and driving my tests using NUnit in C#. My problem is that when I try and build a simple test in Mono I get the following error. Error CS0433: The imported type `NUnit.Framework.Assert' is defined multiple times (CS0433) (TestProject) When I comment out the Assert's it runs fine. The code I'm using currently is just a dump from the openqa site using System; using System.Text; using System.Text.RegularExpressions; using System.Threading; using NUnit.Framework; using Selenium; namespace SeleniumTests { [TestFixture] public class AllTests { private ISelenium selenium; private StringBuilder verificationErrors; [SetUp] public void SetupTest () { selenium = new DefaultSelenium ("localhost", 4444, "*safari", "http://www.google.co.uk"); selenium.Start (); verificationErrors = new StringBuilder (); } [TearDown] public void TeardownTest () { try { selenium.Stop (); } catch (Exception) { // Ignore errors if unable to close the browser } Assert.AreEqual ("", verificationErrors.ToString ()); } [Test] public void GoogleHomepageTests () { // Open Google search engine. selenium.Open ("http://www.google.com/"); // Assert Title of page. Assert.AreEqual ("Google", selenium.GetTitle ()); // Provide search term as "Selenium OpenQA" selenium.Type ("q", "Selenium OpenQA"); // Read the keyed search term and assert it. Assert.AreEqual ("Selenium OpenQA", selenium.GetValue ("q")); // Click on Search button. selenium.Click ("btnG"); // Wait for page to load. selenium.WaitForPageToLoad ("5000"); // Assert that "www.openqa.org" is available in search results. Assert.IsTrue (selenium.IsTextPresent ("www.openqa.org")); // Assert that page title is - "Selenium OpenQA - Google Search" Assert.AreEqual ("Selenium OpenQA - Google Search", selenium.GetTitle ()); } } } Any ideas? Is it a OSX/Mono thing?

    Read the article

  • Selenium server won't start

    - by moff
    I'm getting the following error when trying to start selenium: C:\Temp\selenium-server-1.0.3java -jar selenium-server.jar 22:02:07.615 INFO - Java: Sun Microsystems Inc. 16.0-b13 22:02:07.617 INFO - OS: Windows 7 6.1 x86 22:02:07.625 INFO - v2.0 [a2], with Core v2.0 [a2] 22:02:07.811 INFO - RemoteWebDriver instances should connect to: http://127.0.0. 1:4444/wd/hub 22:02:07.813 INFO - Version Jetty/5.1.x 22:02:07.815 INFO - Started HttpContext[/selenium-server/driver,/selenium-server /driver] 22:02:07.817 INFO - Started HttpContext[/selenium-server,/selenium-server] 22:02:07.818 INFO - Started HttpContext[/,/] 22:02:07.866 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@2bbd86 22:02:07.867 INFO - Started HttpContext[/wd,/wd] 22:02:07.870 WARN - Failed to start: [email protected]:4444 Exception in thread "main" org.openqa.jetty.util.MultiException[java.net.SocketE xception: Unrecognized Windows Sockets error: 0: JVM_Bind] at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:686) at org.openqa.jetty.util.Container.start(Container.java:72) at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:3 96) at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:23 4) at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:19 8) java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.(Unknown Source) at org.openqa.jetty.util.ThreadedServer.newServerSocket(ThreadedServer.j ava:391) at org.openqa.jetty.util.ThreadedServer.open(ThreadedServer.java:477) at org.openqa.jetty.util.ThreadedServer.start(ThreadedServer.java:503) at org.openqa.jetty.http.SocketListener.start(SocketListener.java:204) at org.openqa.jetty.http.HttpServer.doStart(HttpServer.java:716) at org.openqa.jetty.util.Container.start(Container.java:72) at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:3 96) at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:23 4) at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:19 8) Java is installed: C:\Temp\selenium-server-1.0.3java -version java version "1.6.0_18" Java(TM) SE Runtime Environment (build 1.6.0_18-b07) Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing) Thanks in advance

    Read the article

  • using ruby test and selenium grid how can I keep the same browser window for multiple tests?

    - by George Horlacher
    Each of my tests start a new selenium client browser and tear it down so they can run stand alone with this code: def setup if $selenium @selenium = $selenium else @selenium = Selenium::SeleniumDriver.new("#$sell_server", 4444, "#$browser", "http://#$network.#$host:2086", 10000); @selenium.start end @selenium.set_context("test_login") end def teardown @selenium.stop unless $selenium assert_equal [], @verification_errors end What I'd like is to run a suite of tests that all use the same browser and don't keep opening and closing new browsers for every test. I've tried using $selenium as a global object / browser but each test still opens up a new browser and closes it. How should this be done?

    Read the article

  • RuntimeException: Could not start Selenium session: Internal Server Error

    - by user79685
    I am trying to detect a midair collision problem (simultaneous editin) using selenium. So I start a selenium session A with following (Super Class) selenium = new MASSelenium(serverHost, serverPort, *iexplore, browserURL); selenium.start(); selenium.open("index.cgi"); then I try starting a different selenium session B pointing to a different browser from the superclass (Sub Class): selenium2 = new MASSelenium(getServerHost(), getServerPort(), *firefox, getBrowserURL()); selenium2.start(); selenium2.open("index.cgi"); It works fine on my local machine (behaves as expected) but then when i run this same test on a remote machine (using bamboo build tool), i get this exception: java.lang.RuntimeException: Could not start Selenium session: Internal Server Error at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89) at gov.baba.arc.mas.selenium.tests.SimultaneousEditingConflictDetected.setUp(SimultaneousEditingConflictDetected.java:78) Caused by: com.thoughtworks.selenium.SeleniumException: Internal Server Error at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97) at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:168) at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:104) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:86) Any idea why this is happening?

    Read the article

  • Selenium screenshots using rspec

    - by Thomas Albright
    I am trying to capture screenshots on test failure using selenium-client and rspec. I run this command: $ spec my_spec.rb \ --require 'rubygems,selenium/rspec/reporting/selenium_test_report_formatter' \ --format=Selenium::RSpec::SeleniumTestReportFormatter:./report.html It creates the report correctly when everything passes, since no screenshots are required. However, when the test fails, I get this message, and the report has blank screenshots: WARNING: Could not capture HTML snapshot: execution expired WARNING: Could not capture page screenshot: execution expired WARNING: Could not capture system screenshot: execution expired Problem while capturing system stateexecution expired What is causing this 'execution expired' error? Am I missing something important in my spec? Here is the code for my_spec.rb: require 'rubygems' gem "rspec", "=1.2.8" gem "selenium-client" require "selenium/client" require "selenium/rspec/spec_helper" describe "Databases" do attr_reader :selenium_driver alias :page :selenium_driver before(:all) do @selenium_driver = Selenium::Client::Driver.new \ :host => "192.168.0.10", :port => 4444, :browser => "*firefox", :url => "http://192.168.0.11/", :timeout_in_seconds => 10 end before(:each) do @selenium_driver.start_new_browser_session end # The system capture need to happen BEFORE closing the Selenium session append_after(:each) do @selenium_driver.close_current_browser_session end it "backed up" do page.open "/SQLDBDetails.aspx page.click "btnBackup", :wait_for => :page page.text?("Pending Backup").should be_true end end

    Read the article

  • How to use browser options in selenium?

    - by Guru1985
    I have a browser which takes certain parameters as options as shown below. testbrowser.exe -id=test -url=http://www.google.com/. Below is my selenium code. selenium = new DefaultSelenium("localhost", 4444, "*custom "+testBrowser+" -id=test -url=", "http://www.google.com/"); selenium.start(); selenium.open("http://www.yahoo.com"); When i execute this i am getting the below error. java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:103) I think the problem is with options that my browser requires as the same code works fine with firefox or IE. Please help me in solving this options issue. Thanks in Advance Gururaj R

    Read the article

  • What's New & Cool in NetBeans IDE 7.x

    - by Geertjan
    Loads of new features have been added to NetBeans IDE during the NetBeans IDE 7.x release cycle, i.e., 7.0 together with all the minor releases that have come after that, up to 7.4, which was released during the last few days. Hard to keep track of everything added over all those releases, so instead of making a "What's New in NetBeans IDE 7.4" slide deck (which would only cover the highlights of the NetBeans IDE 7.4 Release Notes), as we would normally do, we've instead produced "What's New in NetBeans IDE 7.x", which is around 50 slides presenting all the key features of the IDE, together with all the key newest features. Here it is: If you want to present the wonderful world that is the NetBeans ecosystem to your JUG or school or university or colleagues in your company, just download the above slide deck (either PDF or the PowerPoint sources) here: https://netbeans.org/community/teams/evangelism And happy NetBeans IDE 7.4 to everyone using NetBeans IDE everywhere in the world!

    Read the article

  • Why is Selenium RC so slow?

    - by Pete
    Hi. For some time I have been investigating Selenium RC in order to do functional testing of my web application. I have now found a test strategy that is so effective, that I do not want to move away from Selenium RC (after spending weeks trying to figure out a good way to validate ASP.NET validation controls). But now that my Selenium RC adventure is moving from a POC to be something that I actually use, I'm running into a problem. It is insanely slow. Executing a single test that loads a page, fills in some fields, and clicks a button takes in the magnitude of seconds to execute. When it is executing, I can easily see each individual field being filled out one at a time. Using Selenium IDE in Firefox is not that slow. I found this page, that clearly specifies that Selenium RC is slow http://selenium-grid.seleniumhq.org/how_it_works.html But why is that? Is it because the browser is polling the selenium server? If so, can this polling interval not be modified? Or is there another reason. I am not accustomed to a remote call taking a humanly noticable amount of time to execute. It is horrible that executing a few tests should take so long. I can execute my entire presentation (MVP), business, and database layer test suite (500+ tests) way quicker than it takes to run 10 tests for a single web page.

    Read the article

  • How to use Selenium Grid???

    - by user300591
    Hi All, I'm researching Selenium and have a seminar for my group... I meet many troubles with this I use C# language and write a demo SeleniumExample.dll Then i start selenium RC and NUnit and run it with nUnit to see the test report. I read testdata from xml. Here's the SeleniumExample.dll: using System; using System.Xml; using System.Text; using System.Text.RegularExpressions; using System.Threading; using NUnit.Framework; using Selenium; namespace SeleniumExample { public class Success_Login { //User defined private string strURL = "http://newtours.demoaut.com/ mercurywelcome.php"; private string[] strBrowser = new string[3] { "*iehta", "*firefox", "*safari" }; // System defined private ISelenium selenium; private StringBuilder verificationErrors ; [SetUp] public void SetupTest() { selenium = new DefaultSelenium("localhost", 4444, this.strBrowser[0], this.strURL); selenium.Start(); verificationErrors = new StringBuilder(); } [TearDown] public void TeardownTest() { try { selenium.Stop(); } catch (Exception) { // Ignore errors if unable to close the browser } Assert.AreEqual("", verificationErrors.ToString()); } [Test] public void Success_LoginTest() { try { XmlDocument doc = new XmlDocument(); XmlNode docNode; doc.Load("XMLFile1.xml"); docNode = doc["TestCase"]; foreach (XmlNode node in docNode) { selenium.Open("/"); selenium.Type("userName", node["username"].InnerText); selenium.Type("password", node["password"].InnerText); selenium.Click("login"); selenium.WaitForPageToLoad("30000"); Assert.AreEqual("Find a Flight: Mercury Tours:", selenium.GetTitle()); } } catch (AssertionException e) { verificationErrors.Append(e.Message); } } } } Now I wan to have a demo that using Selenium Grid (SG) but i dont know how to do. I read document and understand the way SG works. I install SG and install Ant1.8. The tests will communicate with Selenium Hub. Actually, I just understand the theory i dont know how to make the tests communicate with Selenium Hub and how to make Selenium Hub control Selenium RC. I am a new for Selenium. If anyone know this, please help me. I appreciate it so much. THANKS, Hoang

    Read the article

  • Selenium IDE and custom confirm() function conflict

    - by sakhunzai
    I am using simple modal dialog by Eric Martin. And have defined a function e.g function confirm(message, options) {.... } To customize all confirm dialogs. Its working nicely accross all the browsers.Except when I enable Selenium IDE ,my custom confirm dialog function fails to capture "options" parameters and firefox console echos like this: options is undefined callback=options.callback; Error When Selenium IDE is visible Normal Behaviour When Selenium IDE is closed Please help me sort out this issue so I should able to run selenium tests.

    Read the article

  • I need Selenium to open it's web browser in a larger resolution ( preferably maximized)

    - by user1854271
    I am using Selenium WebDriver and coding in Python I have looked all over the place and the best I could find were things written in different languages. I also tried to use the export tool on Selenium IDE but when I look at the data says that the function is not supported for export. EDIT: The reason I need the browser to open up with a larger resolution is because the web application that I am testing is supporting tablet resolution as so elements are different depending on the resolution of the browser window. This is the script I exported from the IDE with a couple of modifications. from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException import unittest, time, re from Funk_Lib import RS class CreatingEditingDeletingVault(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(30) self.base_url = "http://cimdev-qa40/" self.verificationErrors = [] def test_creating_editing_deleting_vault(self): driver = self.driver driver.get(self.base_url + "/Login?contoller=Home") driver.find_element_by_id("UserName").click() driver.find_element_by_id("UserName").clear() driver.find_element_by_id("UserName").send_keys("[email protected]") driver.find_element_by_name("Password").click() driver.find_element_by_name("Password").clear() driver.find_element_by_name("Password").send_keys("Codigo#123") driver.find_element_by_id("fat-btn").click() driver.get(self.base_url + "/Content/Vaults/") driver.find_element_by_link_text("Content").click() driver.find_element_by_link_text("Vaults").click() driver.find_element_by_css_selector("button.btn.dropdown-toggle").click() driver.find_element_by_link_text("New vault").click() driver.find_element_by_name("Name").clear() driver.find_element_by_name("Name").send_keys("Test Vault") driver.find_element_by_xpath("//button[@onclick=\"vault_action('createvault', null, $('#CreateVault [name=\\'Name\\']').val())\"]").click() driver.find_element_by_css_selector("button.btn.dropdown-toggle").click() driver.find_element_by_link_text("Rename vault").click() driver.find_element_by_name("Id").click() Select(driver.find_element_by_name("Id")).select_by_visible_text("Test Vault") driver.find_element_by_css_selector("option[value=\"2\"]").click() driver.find_element_by_name("Name").clear() driver.find_element_by_name("Name").send_keys("Test Change") driver.find_element_by_xpath("//button[@onclick=\"vault_action('renamevault', $('#RenameVault [name=\\'Id\\']').val(), $('#RenameVault [name=\\'Name\\']').val())\"]").click() driver.find_element_by_css_selector("button.btn.dropdown-toggle").click() driver.find_element_by_link_text("Delete vault").click() driver.find_element_by_name("Id").click() Select(driver.find_element_by_name("Id")).select_by_visible_text("Test Change") driver.find_element_by_css_selector("option[value=\"2\"]").click() driver.find_element_by_xpath("//button[@onclick=\"vault_action('deletevault', $('#DeleteVault [name=\\'Id\\']').val(), '')\"]").click() def is_element_present(self, how, what): try: self.driver.find_element(by=how, value=what) except NoSuchElementException, e: return False return True def tearDown(self): self.driver.quit() self.assertEqual([], self.verificationErrors) if __name__ == "__main__": unittest.main()

    Read the article

  • YouTube: Chrome Dev Tools Integration with NetBeans IDE!

    - by Geertjan
    Some time ago my colleague David Konecny discussed the question "What works better for you? NetBeans IDE or Chrome Developer Tools?". It's a good read. David highlights the point that it's not a question of either/or but both, since the two tools are like the apple/pear dichotmoy. However, good news! The two worlds are not divided in NetBeans IDE 7.4. Changes you make in Chrome Developer Tools (CDT) are automatically persisted to the related files in NetBeans IDE, as you can see in a new YouTube clip I made today. The new integration of CDT with NetBeans IDE has been mentioned in the NetBeans IDE 7.4 New & Noteworthy, while on Twitter this was sighted yesterday: Watch the movie above and within 5 minutes you too will see the simplicity and power of CDT integration with NetBeans IDE. In other news. I consider the above to be my favorite (though it's a tough choice, since there are so many new features in NetBeans IDE 7.4) new feature, for the article "What is your favorite new NetBeans IDE 7.4 feature?"

    Read the article

  • Selenium Grid not always using all of its registered RC's, why?

    - by BenA
    My Selenium Grid setup is as follows (all VMs) VM1 - Windows 7 x64 - Grid Hub + 2 RCs registering the default *firefox environment VM2 - Windows XP x32 - 2 RCs registering the default *firefox environment VM3 - Windows XP x32 - 2 RCs registering the default *firefox environment I'm happily using Mbunit and Gallio to drive the Grid, but my problem is that sometimes the Grid hub will stop passing executions over to 1 or more of the RCs, despite their showing available on the hub console. They seem to be happily maintaining their heartbeat back to the hub, but they're never asked to do any more work. This is after they had been executing tests earlier in the test run. Does anybody have any ideas why this should happen? In every case I've observed this behaviour, the last test an RC executed, before it then seemingly gets ignored by the hub, passed, and the session was successfully closed. Interestingly, whenever it happens to more than 1 of the RCs, its always (so far) been the pair that are running on the same VM. Yet they're managing to maintain their heartbeat, so it isn't a network connectivity problem. Any help would be greatly appreciated!

    Read the article

  • Selenium RC Error when running tests

    - by Sheoque
    I get this error when running a number of tests in seleniums Bromine, The selenium RC version 1.0.2 outputs this: WARN - GET /selenium-server/driver/?cmd=testComplete&1=&2=&sessionId=1274d41621c64fc08c1e7ea0a58f260b HTTP/1.0 java.lang.IllegalStateException: unexpected command json={command:"open",target:"/Library/Security/Login.aspx?ReturnUrl=%2fIndex.aspx",value:""} in place before new command selectWindow could be added at org.openqa.selenium.server.CommandQueue.doCommandWithoutWaitingForARe sponse(CommandQueue.java:121) Any ideas

    Read the article

  • [Selenium] Don't stop on HTTP error 403

    - by Sebi
    In one of my Selenium test cases, I try to ensure that certain pages can't be accessed. Instead, HTTP return code 403 should be given. However, here Selenium terminates test execution with the following exception: com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://user:[email protected]/admin Response_Code = 403 Error_Message = Forbidden Any way to work around that?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >