selenium

Open a URL with parameters using selenium.open()

I am using selenium.open(), to open a URL, which prints the cookie output to the browser window: String cookiestr = "http://my.server.com/cookie?out=text"; selenium.open( cookiestr ); The problem is that, it opens a "Save As..." popup, to save the file named "cookie". When I open the same URL in my browser directly, it displays text i...

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

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 us...

[Selenium] how do I assert that a hyperlink points to a given URL?

I am using Selenium IDE and Selenium RC to check links on a website, but I am having trouble finding a way to assert that a link points to a specified url and has the specified text. Constraints: locating the element by dom or xpath is not feasible for it will make the test brittle there are multiple link elements with identical link...

How can I prevent javascript errors in my selenium tests from hanging my build system?

We are having a problem with our selenium tests which run in IE on a virtual machine. Whenever there is a javascript error, a popup shows up and puts our system into a 'stuck' state - a user has to go clear that and restart the selenium test run. Is there a way to prevent the javascript error popup from putting the system into its stuck ...

How can I create a program to create multiple files from one template with different values inside?

I need to create 1500+ ruby files from a template for some testing I'm doing with Selenium. The template looks like this: class $CLASS_NAME require "spec" attr_accessor :title include Spec::Example::ExampleGroupMethods include Spec::Matchers def initialize @title = "$OLD_URL -> $NEW_URL" end def execute(selenium) selenium....

Using Selenium, how can I test a web UI that returns XML instead of HTML?

I'm using Selenium to unit test my Perl cgi script and all works fine except in one special test case where my cgi script returns XML content to the web browser instead of returning HTML content. I'm new to Selenium and only pasted in their sample script to get started, but I can't seem to find a Selenium command in any of the documen...

Testing flex with selenium without updating code

Hi all, I have been asked to check how to load test a flex application. I've though about using Selenium, since it's precisely its job. I've also found that testing Flex with Selenium requires extensions to Selenium. I've seen that there some of these : sfapi flex-ui-selenium First, it seems that both requires me to rebuild my Fle...

How can I tell JWebUnit to contact specific Selenium servers

We want to run selenium backed jwebunit tests from our hudson server. We have a couple of selenium rc servers already on our network which I'd like to reuse. However how can I configure jwebunit to use those servers as I would like to avoid installing a slenium rc server on the hudson. Building is already work enough without starting/st...

I want to generate XML oupt result with Selenium R. How to do ?

Hi, I create a test suite with Selenium IDE. I use a ant task to execute it with htmlSuite but the result is created in HTML. How can I generate the result into JUnit XML output understandable by Bamboo ? Thanks a lot ...

TestNG - Factories and Dataproviders

Background Story I'm working at a software firm developing a test automation framework to replace our old spaghetti tangled system. Since our system requires a login for almost everything we do, I decided it would be best to use @BeforeMethod, @DataProvider, and @Factory to setup my tests. However, I've run into some issues. Sample Te...

Selenium RC: How to click buttons that use onclick window.location?

I have a button (outside of a form) that redirects to another page using the onclick attribute that calls window.location to redirect the user to another page. This time I can't change the HTML. I am using Safari 4 for testing. How can I click a button that uses the onclick attribute and window.location to redirect using Safari 4 and Sel...

Help needed wit the XPath statement for Selenium test

I am testing a calendar component using Selenium. In my test I want to click on the current date. Please help me with the XPath statement for doing that. I am adding the HTML for the calendar component. <input id="event_date" type="text" on="click then l:show.event.calendar" style="border: 1px solid rgb(187, 187, 187); width: 100px;" f...

Is any way to get captcha value and store it in a variable?

I am Using Selenium RC in C# My application has 3 Captha image in Different registration pages. i have a Huge script i will run it on night hours(when i am off). Hence i feel it will be better if i can capture the last displaying captcha image value and store it in to a variable so that i can input on the relevant field. Is it Possible ?...

cucumber, capybara & selenium works randomly

Setup with cucumber, capybara and selenium but some scenarios works only randomly. Running ruby 1.8.6 on rvm rails 2.3.8 selenium pops open firefox 3.6 I have tried to add this with no luck: with_scope(selector) do click_button(button) selenium.wait_for_page_to_load end The error output is sometimes: > Given I am logged in an...

Selenium problem locating by DOM

Hi, I'm trying to use the DOM to locate a form element in Selenium but I can't get it to work. Even if I use the example in the Selenium documentation it still fails, for example with this html... <html> <body> <form id="loginForm"> <input name="username" type="text" /> <input name="password" type="password" /> <input ...

Selenium RC: How to check if an element has a given attribute?

I have some buttons with an onclick attribute and some that don't. I want to check if the specified element has the onclick attribute. How can I do this? getAttribute() returns the attribute value when it has one. When it doesn't, it throws a RuntimeException and stops the test (even when I wrap it in a try/catch block). $onclickValue ...

Ensuring a divs content has changed over time in Selenium

I have a div that contains a slideshow. ( http://film.robinhoodtax.org/issues/education ) I am using Selenium to test it. So far I have been using the HTML/Selenium script below to validate that the slideshow is actually working. But my assertEval is failing. How can I correctly detect the slideshow and make sure it is moving?. ...

Using Selenium and phpUnderControl on a Linux headless box?

I am trying to integrate Selenium and phpUnderControl on a headless Linux box, but haven't found anything about it. I can run Selenium with Xvfb, and phpUnderControl is running OK. My question is: how to configure phpuc to execute selenium tests, and show their results on its webpage? Is it possible? ...

Selenium and :hover css

Using selenium-rc and the java client, I want to test a menu which opens when the user moves the mouse over it. It closes when the mouse leaves the menu. This is done using :hover css, without any javascript. In selenium, there are many methods for mouse actions, but none of them seems to trigger any css :hover style to be used. Googl...

XPath statement not executed in IDE

Hi,i faced a problem while replaying a script created for yahoomail page.The XPath statement to enter value in the "To" text field , is not working.Following are the XPath statements i used. At the first try i used <tr> <td>type</td> <td>to</td> <td>[email protected]</td> </tr> Second try was this statement <tr> <td>type</td> ...