selenium

Selenium RC fails to setup Internet Explorer to run tests

So I created a test that runs fine in fire fox super.setUp("*chrome");. And now I try to run this on my machine for internet explorer super.setUp("*iexplore"); //not iexplorer!. This works fine on another developers machine, we both use vista and are running Iexplorer 8. However on my machine, the page is blank and the URL is this: C:\Us...

Convert Xpath locator to CSS locator in Selenium

All, This xpath locator works fine in Firefox: ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_LBI2­T0 This does not work in IE. I have been trying to convert to CSS locator without success. The item I am trying to select is Seller. Here's the whole blob: <div style="width: 168px; overflow: auto; height: ...

Using WebKit GTK-Launcher as custom browser with Selenium-rc

How do we use WebKit-Gtk-Launcher as a client custom browser. I am using java as language + scripting. I have used the following api for the setup. setUp("http://localhost:4444/", "*custom /home/shashidhar/WebKit-r60144/WebKitBuild/Debug/Programs/GtkLauncher"); Using this it opens only a single instance of GTKlauncher were frame Command ...

Spawning multiple browsers from Selenium RC utilizing Python

I've been trying to develop an automated test case solution using Selenium RC and Python and after lengthy testing I've hit a pretty hard block in the road, so to speak. I have three files: unit.py, case1.py, and case1m.py unit.py configures instances of case1m.py with a browser and a port, then runs the test by sending the case1m ins...

Flex : How to design a fully functionnal automated App ?

Hi everyone, We are currently thinking on getting our apps automaticaly built and tested through a CI server. My major concern is regarding UI tests.. I've been playing with FlexMonkium/Selenium IDE in Firefox but it doesn't really play nice with my app. I'm also testing RIATest 3 but I would have liked the Firefox approach better beca...

Setting Selenium RC speed via command line

Hi, I'm using SeleniumRC to run some selense tests via command line. This works mostly fine, but some tests are failing because the execution speed is too high. How can I set the test runner's default execution speed? The command I am using the run the test suite is java -jar selenium-rc\selenium-server-1.0.3\selenium-server.ja...

How do I get 'rake test:acceptance' to run successfully on Windows?

I am currently investigating using the selenium-on-rails plug-in for testing an upcoming web app that we are developing. I've written some tests, and can get them to run successfully in the test runner in the browser, however when I try to run them from the command line using 'rake test:acceptance' I see the following error: rake aborte...

retrieving text in selenium using xpath?

Hi i have this HTML code: <tr class="odd events" style=""> <tr> <a title="Expand to see Actions" class="toggleEvent" name="actions_for_host_1" href="#"></a> <td id="7" colspan="6"> <div> <ul> <li>Low Alarm at 2010/06/25 07:09 ( <span title="2010/06/25 14:09 (UTC)" class="time_helper">Pacific</span> )</li> </...

How can i programmatically control the starting and stopping of Selenium RC

At the moment i use selenium using HTMLSuite. The command i use to start the server and run the a testsuite is shown below java -jar selenium-server.jar -htmlsuite "*iexplore" "http://localhost:8080" "C:\test\testsuite" "C:\test\result_%Yr%%Mth%%Day%.html" I have some testsuites which have some sql scripts which need to be run first. ...

How do I escape an apostrophe in my XPath text query with Perl and Selenium?

I have an XPath query which needs to match some text in a span attribute, as follows: my $perl_query = qq(span[text\(\)='It's a problem']); $sel->click_ok($perl_query); Where the text has no apostrophe there is no problem. I've tried the following instead of 'It's a problem': 'It\'s a problem' 'It&apos\;s a problem' 'It\${apos}s a ...

Handle Selenium RC open method failure (404)

I have a loop that checks for the existence of urls. If one does not exist Selenium exits: *XHR ERROR: URL = http://localhost/pages/156.php Response_Code = 404 Error_Message = Not Found.* If i catch the exception: try { $this->selenium->open($url); } catch(PHPUnit_Framework_Exception $e) { echo "caught\n"; } Anything i do afterw...

Having problems with webdriver & frames

Hi guys, I'm trying to migrate from watin to selenium 2 However, upon loading a significant ammount of pages, it is selecting the 1st frame in a frameset by default. (which is a header frame) I can't seem to select any other frame on the page, or navigate to the parent html (containing the frameset) heres some stuff I've tried; Bro...

Selenium: Can I tunnel through an *External* HTTP/SOCKS proxy over Firefox?

I know Selenium Server acts AS a proxy. But I want to know if I can instruct a test to connect through to either a SOCKS or plain http proxy, eg: Tuenneling through an external Proxy. (It's so hard to search for because the word proxy just shows how Selenium works, not if it supports this feature....) ...

redirect a http request using selenium

This is quite a straight forward question that I can't seem to find a comprehensive answer for. When using Selenium and Selenium proxy, how I can make the proxy catch outgoing xhr requests to specific uri's and modify the destination to a pre-mocked alternative. I found this example form googling, http://www.sonatype.com/people/2009/10/s...

Selenium Firefox Open timeout

Using Windows 2008, C#, Firefox 3.5.1, Selenium RC (v1.0.1) When it works, this code executes very quickly and the page loads within .5 seconds. However, the session always seems to fail after 3 - 5 iterations. The open command will cause a window to be spawned, but no page to be loaded. Eventually a timeout exception is returned. The ...

Is there a way to freeeze Selenium-RC execution on error?

My Google-fu is weak and so I turn to the hive mind... I have a Selenium script I originally developed in the IDE, which I am now trying to adapt to run on IE8 via Selenium-RC. I'm trying to debug an error where an element is not being found. The problem is that as soon as the error occurs, the script exits and RC closes the browser. ...

How do I test which element has the focus in Selenium RC?

the question like the title ...

selenium element not found when running by IE

The selenium test passed by Firefox. But When I'm trying to run it by IE, I get the error "Element xpath... not found" string xpath = string.Format("xpath=(//table[@id='{0}']/tbody/tr[not(contains(@class,'{1}'))])[{2}]",tableId, CLASS_HIDDENROW,rowNumber); string rowid = Selenium.GetAttribute(string.Format("{0}/@id",xpath)); I debugge...

Simulate TAB keypress event in Selenium RC

I need to simulate a tab keypress in Selenium RC, using the Java API. I do this after having entered some text using: selenium.type(input, "mytext"); I've tried 3 alternatives to get the tab working: selenium.keyPress(input, "\\9"); and: selenium.focus(input); selenium.keyPressNative("09"); and even: selenium.getEval("var evt ...

escape colon in Xpath search

Hi, I'm using Hpricot with selenium I have this html input element: <input id="foo:bar"/> And I'm trying to get this value with this Xpath expression: source = Hpricot(@selenium.get_html_source) source.search("//input[@id='foo:bar']") but it is not finding anything because of the colon. I have seen that the Xpath expression cannot...