selenium

Can I use xpath 2.0 with firefox and selenium?

I saw other questions referring to xpath 2.0, which apparently simplifies string expressions. I'm using Firefox 3.5.5 and selenium 1.0.1. How can I check if my versions of Firefox and Selenium support it? Does Selenium defer to Firefox's built-in Xpath implementation? In that case, if I start using another (perhaps older) browser with ...

Selenium fails to find component after dom update (reRender)

I'm testing a richfaces application with selenium. It works fine, unless I use reRender. (for those unfamiliar with richfaces - whenever an ajax request finished, parts of the DOM are updated/chagned/removed). So, after a reRender selenium (the IDE at least) fails to locate the elements which were within the reRendered area. Both FireBu...

In Selenium IDE how can you select an option by index in a dropdown menu?

The problem is the option labels change and so I cant grab by label. I need to grab by say option[0] any idea? I'm using Selenium IDE (Firefox), this is the piece im asking about: <tr> <td>select</td> <td>dateRangeString</td> <td>index=1</td> </tr> the last TD there is the VALUE field in the IDE, I already am targeting...

Setup for IE6 (and multiple browsers) in Selenium Grid

I'm having a hard time trying to grasp some concepts on selenium Grid/RC. What I need is to provide specific environments (ie6-on-xp, ie7-on-xp, etc) to the tests. For what I've been reading, the browser line in grid_configuration.yml do not make any reference of what version of MSIE or Firefox I'm running. So I can't get my head around ...

HTTP Basic Auth and Proxy for selenium-webdriver (ruby bindings)

I'm attempting to use the selenium-webdriver [ruby bindings][1] to access an internal web-site that requires a proxy to be configured, and HTTP Basic Auth. I currently have: require "selenium-webdriver" driver = Selenium::WebDriver.for :firefox driver.navigate.to "http://my-internal-site.com" But this fails due to both the pro...

Selenium keypress esc not work in FireFox

Hi everyone! I wrote this code for my unit tests in c# with selenium to test my web application. In particular I'm testing that the window for the tooltip is properly displayed and after esc key press it disappears: private const string XPathToolTipStyle = "//form[@action='search.aspx'] //div[@id='searchToolTip']/@style"; private bool...

How to use a certain Firefox profile in Python Selenium binding?

Hello, I'm looking for a solution similar to presented in this question, except it has to deal with python. ...

Selenium-Flex API sample problem

Hello, I'm trying the sample demo of selenium flex API. After following the instructions on the main page for compiling the project with sfpi.swc and taking the generated selben.swf in bin directory and trying to run some test(assertFlexText) using Selenium IDE, I get the following error: [error] Function getFlexText not found on the E...

Running Selenium headless without using xvfb

I'm trying to run Selenium headless (without the browser appearing). Other questions have pointed to xvfb as the tool to do this. However, it appears highly unstable, crashing all the time, so I'm looking for another alternative. Is there a non-xvfb way of running Selenium headless? ...

How to extract attribute values using css selectors?

I want to select the values of attributes of an element. For e.g if I have an input element <input type="text" name=myInput value="100"> I can locate it using input[name='myInput'], but how do I get the value of it using a css selector? BTW, I am trying to do this in Selenium using css selectors ...

"SQLite Version Error"

Hello, I tried to run webrat tests in selenium mode, but I got the following error: dyld: Library not loaded: /usr/lib/libsqlite3.dylib Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides ver...

Flash-Selenium and Python

I want to try Flash-Selenium with the python driver, however I have some concerns regarding the available python extension, it seems aged and there is no example on how to use it... Is there anybody who is using it? Any example on how to use it ? ...

Cucumber + webrat + selenium, how do I ignore hidden text?

I am using Cucumber, webrat and selenium to test a web application. I use 'I should see "something"' to verify changes. However, in many places, text to be verified only changes from hidden to visible (this might be caused by removing 'hidden' class from itself or one of its ancestors). In this case, above test does not actually verify t...

Selenium-rc: Is there a way to send a buffer of requests

Lets say I have a list of links and want to click a link at random: <div id="divA"> <a> first link </a> <a> second link </a> ... </div> It isn't the smartest of ways (and if you have a better solution please tell me) but what I currently do is (roughly): l = [] for i in range(numOfLinks): xpath = '//div[@id="divA"]/a[%d]...

fire both blur and focus tightly coupled?

Any idea how I can fire the blur even just after the focus event, such that it doesn't occur "loosly coupled" (the actions are send one-by-one to the selenium server). Let me explain: In Selenium RC you fire the blur and focus through fireEvent(locator, "blur") and fireEvent(locator, "focus"). However, after the blur event is send to t...

Selenium - "Firefox is already running" error

We are running some tests using selenium. We have dedicated Windows XP VM's for that, with one selenium RC server on each VM, and no other process running on that VM. We open and close a selenium session for each test. The tests always call selenium.stop() when they finish. A lot of times (1 in 30 I would say) one test hangs, and when I ...

selenium: Is it possible to use the regexp in selenium locators

I want to get the xpath count of all the divs/links/.. that have text matching some regular expression. For example: <span> day 2 night </span> <span> day 4 night </span> <span> day 17 night</span> I would like to be able to call: sel.get_xpath_count('regexp:day \d night') and have it return 2. (This is a simple example of course, ...

Selenium: Loop Through Each <option> in Drop Down List

I'm using Selenium to ease my testing burden and I have about 1,000 different drop down list combinations (spread across multiple pages and drop down lists) that need to be tested. Basically, what I would like to do is select each <option> inside of a <select>, click the Submit button, select an item (first, second, third, etc.) in the d...

How to get Selenium to wait for a transition page to redirect before running an assertion

I have a fairly standard situation: Click a button, it loads a transition page with a progress bar or something, and then that page redirects to the next page, which takes a while to load. I want to run assertions on the final page, not the transition page. How do I tell Selenium IDE to wait till the final page loads before performing ...

Mercury Test Director vs. Selenium: Compare and Contrast

The Question: What are the benefits and disadvantages of TestDirector over Selenium Some background: I have a little experience with Selenium, but I'm told my company owns an enterprise license of TestDirector (and that I may be forced to use it). Thus, apparently cost is not an issue. Given that, I'm wondering what I give up from Selen...