selenium-rc

Can Selenium handle tabbed browsing

I am carry out some functional test on a website where I basically want to open a website in the window then another in a second tab and control both of them. A solution is not to use two windows. Is this at all posssible? ...

Selenium RC test - IE gives 403 error on Tomcat app, Tomcat root OK

I'm new to Selenium RC, having previously used Selenium IDE and only run tests in Firefox. I'm trying to get a basic test to run using Selenium RC through Eclipse; my test works OK in Firefox, and in Safari now that I've killed the pop-up blocker, but IE8 is causing a SeleniumException to be thrown, containing an "XHR ERROR" with a 403 r...

Selenium: How to select an option from a select menu?

I am writing a Selenium test in PHP using the PHPUnit Selenium extension. I know how to type something into a text field: $this->type('fieldName', 'value'); But how do I select an option from a drop-down menu? ...

Selenium: How to assert that a text field is disabled?

I am using the PHPUnit Selenium Extension for Selenium RC. I am able to assert the field is present: $this->assertElementPresent('Date'); But how do I assert that the field is disabled (or not editable)? ...

Selenium: How to click an HTML button element?

I have button on the page that being used as a link to another page. So when the user clicks the button they are redirected to the right page. I am using the Selenium extension for PHPUnit and I would like to test that the button is correctly redirecting the user. Here is the HTML that I am trying to test: <button onclick="window.locat...

Testing an iframe with Selenium puts the iframe into infinite loading while manual check for the same iframe goes fine.

I am testing an iframe within a page. When I run my ruby script with selenium-rc, the page loads up fine but the iframe goes into an infinite loading causing my script to time-out. Though on manually checking the same script, we get the expected result. Any idea if selenium does something with the browser settings?? I have tried it with ...

Selenium RC:How to launch Interactive testing with Multiple browsers

I want to automate this scenario. UserA assign an item to UserB, who gets an alert message. In order to do this I want to have two different browsers launched with different accounts to test this interaction. Is is possible to do this? If yes, how? ...

ASP.NET MVC Head Verb and Selenium RC

Selenium (RC) is being used to test an ASP.NET 1.1 site. When we make a request via Selenium RC (which in turn automates the request via a configured browser - in this case Firefox) the http verb is "HEAD". We have several form action methods that have separate GET and POST methods decorated with AcceptVerbs(HttpVerbs.Get) or HttpVerbs...

Selenium RC throws sessionsid should not be null exception with assertTextPresent, phpunit 3.4 bug only?

I am looking to migrate my selenium RC tests to using PHPUnit 3.4.12 from PHPUnit 3.3.2 The selenium test will fail with an exception of the following when I use assertTextPresent() PHPUnit_Framework_Exception: Response from Selenium RC server for getLocation(). ERROR Server Exception: sessionId should not be null; has this session be...

PHPUnit Selenium captureScreenshotOnFailure does not work?

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 = t...

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

My Selenium Grid setup is as follows (all VMs) VM1 - Windows 7 x64 Windows XP x32 - 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 dr...

Pass command line arguments to JUnit test case being run programmatically

I am attempting to run a JUnit Test from a Java Class with: JUnitCore core = new JUnitCore(); core.addListener(new RunListener()); core.run(classToRun); Problem is my JUnit test requires a database connection that is currently hardcoded in the JUnit test itself. What I am looking for is a way to run the JUnit test program...

How to select TreePanel node(Parent/child) in selenium java

My Application having TreePanel Element and I have to select the root node at the begining to add child node underit. When I try to click on root node using its XPATH String locator = "//div[@id='resultPropertyTree']/div/table/tbody/tr/td"; selenium.clickAt(locator,"0,1"); The entire element is going invisible hence script throwing deb...

Capture output from browser call using Selenium

I need to create a use case (using Selenium) in which I send HTTP calls with a Cookie through the browser and capture the return value in a text file. What do I need to do this, I have run this using CURL in the command line, but we are encountering issues with the same, and hence wish to verify using a real UI browser. Another thing t...

Page Loading in FireFox and IE in Selenium RC

I've met with strange issue in Selenium RC. When I use IE7 the test works fine. However if I use firefox 3.5, Selenium fetches the page before it completely loaded. Using a thread sleep resolves that matter. Is there a difference between, how page load flag handled in IE and FireFox? selenium.setTimeout(Timeout); selenium.open("http://...

Unexpected Error in Selenium

I am getting a Unexpected error in some of the Selenium RC code. Some time it works fine but sometimes it gives the Unexpected error and the scripts stop at that line only. Example: There is script for "Login" than it click on the link than fills some form than press some button. Sometimes its run till Login, sometimes till click of a...

Selenium RC 403 Error - Forbidden for proxy

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

Is there any way to delete an HttpOnly cookie from C# Selenium tests?

I have a set of C# Selenium tests that need to delete a cookie that has the HttpOnly flag set. Unfortunately the DefaultSelenium.GetCookie() and DefaultSelenium.DeleteCookie() commands aren't able to access the cookie, because it has that HttpOnly flag set. I've confirmed this by removing the flag by hand, and checking that subsequent c...

Selenium: How to enter white space as the value of a text field?

I have a form text field that is being populated with a default value. I would like to clear the value and enter white space to assert that the expected validation occurs. I am using Selenium RC and the PHPUnit Selenium extension. How can I achieve this? Note: I have already tried doing these, but they do not work: $this->type('FirstNa...

Running a javascript inside the head tag in Selenium RC

I want to run a javascript snippet inside the <head> tag. Is that possible to do that in Selenium RC+Java? I understood that if I use getEval or runScript that will insert the code inside the HTML body. Any Ideas? Thanks ...