selenium

autogenerate HTTP screen scraping Java code

Hi, I need to screen scrape some data from a website, because it isn't available via their web service. When I've needed to do this previously, I've written the Java code myself using Apache's HTTP client library to make the relevant HTTP calls to download the data. I figured out the relevant calls I needed to make by clicking through t...

Selenium alternatives?

Selenium seems to be the mainstream tool for browser side testing and it isn't that horrible. But are there any alternatives hiding out there, even in beta phase? ...

Selenium: How do I use javascript to clear a value from a form field?

I'm using the selenium IDE and the Selenium-Fitnesse Bridge fixture and I'm trying to test that when I clear a default value out of a form field, my form displays an error message. So when I record with the Selenium IDE, what it does is the equivalent of telling Selenium to type nothing. | type | text_field | | The problem with this ...

JavaScript simulate right click through code

Hi All, I am writing some UI tests using Selenium and i have a JavaScript Tree control, using the Dojo toolkit. I have implemented a context menu for each node of the tree using the examples that Dojo provide, but I need the Selenium test to "invoke" the right click on the tree node, but I cannot get this to work. The tests simply do n...

How to run a recorded (HTML) selenium test from .NET

I run Selenium tests with Selenium RC from .NET (c#). In some cases, I would like to keep the test case source as HTML (to be able to modify it from Selenium IDE), but I would like to run/include these tests from my c# unit tests. Maybe it is obvious, but I can't find the API method in the Selenium Core to achieve this. Any idea how to...

Selenium or Watir for Javascript Testing in Rails

We're using RSpec and Cucumber in our Rails apps with good results. Webrat is great for non-AJAX interactions, but we're getting ready to get back into writing tests for our Javascript. Webrat has Selenium support built in, and we've used Selenium before, but I'm curious if anyone has had good results using Watir with Cucumber and what ...

How can I make my Selenium tests less brittle?

We use Selenium to test the UI layer of our ASP.NET application. Many of the test cases test longer flows that span several pages. I've found that the tests are very brittle, broken not just by code changes that actually change the pages but also by innocuous refactorings such as renaming a control (since I need to pass the control's cl...

How do I continuously run a single test case using Selenium?

I have recorded a very simple test case Using the Selenium IDE integrated with Firefox. I want the test case to run continuously over a period of time. How can I make the test run continuously? ...

How do I redirect stdout and stderr output from a Perl script to a file on WIndows?

I tried this: test1.pl >output.log 2>&1 but this is the result: Can't dup STDOUT: Permission denied at C:/Perl/lib/Test/Builder.pm line 1376. Compilation failed in require at C:/Perl/lib/Test/Builder/Module.pm line 3. BEGIN failed--compilation aborted at C:/Perl/lib/Test/Builder/Module.pm line 3. Compilation failed in require at C:/...

How can I consume Firebug net panel data programmatically?

My agile team will be adding new features to a existing realty website. As we add the features we want to have a better handle on the site's overall performance as well as the performance of particular pages. I would like to automate the gathering of performance metrics on a request/response basis for each page (e.g. what sub requests...

Using waitForCondition ( script,timeout ) in Selenium IDE

I recorded a script using the Selenium IDE extension for Firefox, and I would like to add the command waitForCondition. I see it takes two arguments: script and timeout. In Selenium IDE, I have 3 text fields for each command: the command name (I assume "waitForCondition"), the target, and the value. Where and how should I put the two arg...

Accessing properties of window with Selenium

The page I am trying to test sets the value of "global variables". From the Firebug, I can access those as properties of the window object (e.g. window.foo). From Selenium however, typeof selenium.browserbot.getCurrentWindow().foo always return "undefined", say when used in the condition of a waitForCondition. Any idea of what I could b...

selenium-maven-plugin

Hi, i'm trying to set up the selenium-maven-plugin and having some difficulties i hope somebody can help me. My configuration looks like this: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>selenium-maven-plugin</artifactId> <executions> <execution> <phase>pre-integration-test</phase> <goals> <goal>...

Automation Script: Click on "Cancel" button on alert window by Ruby

I would like to know is there any way to select(click on) Cancel button on alert window? I used: @browser.choose_cancel_on_next_confirmation() @browser.click("//td[text() = '[email protected]']/../td//a[text()='Delete']") ...

Selenium test on a GWT app - request not sent to server

I'm writing a selenium test for a GWT app. It uses the mouseover/ mousedown/mouseup approach to click pushbuttons. It clicks the Login button of my app, which calls up the div containing userid and password entry fields, and that works just fine. It then enters a userid and password, then clicks the Submit button for the login form. ...

Cucumber + Selenium on javascript apps

I am trying to learn how to best use Cucumber + Selenium. For the most part it seems to be very straight forward but I would like to get some guidance on how to test dialogs. Basically I need to implement: assert !60.times{ break if ("Other Income" == @selenium.get_text("//form[@id='new_account']/h3") rescue false); sleep 1 ...

How to use storeHtmlSource in python code (Selenium RC)

I found storeHtmlSource method description in Selenium reference, but can't figure out how to use it in python code I generated by exporting recording of my actions from the Selenium IDE. I need to pass the html source code of the current page into a function for processing. How to do that? Can anyone show example of code for calling th...

Automated test with Ruby: select an option from drop-down list

I write automated test with Ruby(Selenium framework) and I need to know how can I select an option from drop-down list. Thanks in advance! ...

Selenium: How do I execute an Xpath function or expression in my test?

Is there a way to execute some Xpath code in a Selenium test? I know you can execute javascript, but I'm looking for a way to execute some Xpath code beyond simply locating an element on the page. Anyone run into this? ...

MSTest - Executing Tests Multiple Times

I'm using MSTest to drive Selenium, and I'd like to execute tests against multiple browsers in the same test run. Is there any way to do this? Thanks, Nathan ...