selenium

How do I test modal dialogs with Selenium?

I'm getting started with Selenium IDE and trying to test a webapp that's full of model dialogs (window.showModalDialog). Recording the test seems to work (except there's nothing in the log when the dialog pops up) but they don't play back properly. The script actually opens the window (triggered by a button click), but then just waits i...

How to run a script embedded in the page in Selenium IDE?

I'm testing a page with Selenium IDE and want to execute a method already in the page. I've tried getEval(window.name.space.function()) but it just returns window.name is undefined. Is this possible? ...

How to test functionally that something should happen at given time?

I'm writing a web application which contains a kind of schedule. After a certain action, the schedule is updated and when the user visit the page that day something happens. Any ideas how to write a functional (acceptance) test for that kind of functionality? I'm writing these end-to-end tests using Selenium. The only idea I have is t...

Selenium element not found

I am writing a Selenium test in PHP to check the performance of a web application in Firefox. I want to use this as a base-line for comparing different performance enhancements (upgrading JQuery, PHP 5.3, etc.). The web application is very AJAX intense and so far I have only run into one problem. I have an AJAX call that loads content...

how to change cruisecontrol head.xsl to reflect value dynamically from testng

Currently I can hard code the header.xsl in cruisecontrol to show anything I want (e.g. browser type), but I'd like to also see the version of my app testng is running against. The version number is situated on the first page of my app under a div class. Is there a way to have cruisecontrol set the value into the header.xsl from grabbing...

How to fill Web Form from Flash or Javascript?

I am looking for a solution to fill web forms from flash or javascript. The "filling" should be done non-visually. The "filling" should be initiated from user computer, because I need to access local network resource. Just by looking at Selenium and iMacros I can tell that creating player that is smart enough is a pretty big project. I ...

Query html tag with XPath

I am writing the selenium test. I have a label there "Assign Designer" and the select box followed right after the label. Unfortunetely, select box has the dynamic id and I can not query it by id or any other it's attribute. Can I build the XPath query that returns "First select tag after text 'Assign Designer'"? PS. Selenium supports...

Selenium xpath flow

Hi All, Can anyone tell me what is the exact flow of taking out xpath in Selenium-IDE. After trying alot by putting alerts i m not getting how to take out the exact xpath. Selenium displays the xpath according to xpath:position and some others ways also but i want to add the xpath traversing from html i.e the topmost position.How can i ...

Unit testing the MS AJAX Toolkit HTML editor

Is it possible to unit test the MS AJAX Control Toolkit's HTML Editor? I've tried Watin, WebAii and Selenium without any success... Watin I can find the textbox related to the control but I get an exception trying to access it: using (Browser ie = new IE()) { ie.GoTo(testUri); Assert.IsTrue(ie.ContainsText("Expected text")); ...

Problem with SelfSSL and Firefox 3

I have a IIS website with a security certificate setup using SelfSSL (part of the IIS Resources toolkit). The certificate appears valid when I view it in ISS and it works fine for IE, Safari and Google Chrome. However, in Firefox 3 it does not consider the certificate valid and therefore shows a certificate warning when you view a secure...

selenium: a custom locator that uses xpath locator

I want to define a custom locator with selenium, and I want it to use the existing xpath locator. The code below does not work. How should I do it? PageBot.prototype.locateElementByNg= function(text, inDocument) { var xpath = doSomeManipulation(text); return PageBot.prototype.locateElementByXpath(xpath, inDocument); }; ...

DragAndDrop in selenium

Hi all, While using DragAndDrop function on a splitter control what I see is first it gets stuck most of the times. Also when I give the offset as +70 it moves to the position which is 70 units away from the start of the screen. What I understand is that it should move 70 units away from where it is now. Any idea why this is not workin...

Rails testing with Selenium and everybody has a wrong password

I have an application with a bunch of cucumber tests, and I tried using selenium with it today. It took a bit, but I got it running, it starts up selenium, uses the correct database and everything, but everybody has a wrong password. I can see the user getting created, I can log the password and see that it's the correct password, but e...

Cucumber + selenium fails randomly.

My selenium tests like to fails randomly. As an example I have this scenario Scenario: I should be able to edit a user Given I created a user with the login "[email protected]" And I am viewing the user with login "[email protected]" Then I should see "Edit this user" When I click "Edit this user" Then I should be editing the us...

How to decouple the UI object identifiers from the test scripts while writing Selenium tests

I'm planning on writing some test scripts for a J2EE app using Selenium. The PageObject pattern sounds pretty good as it allows a clean seperation between test logic and implementation. How can I maintain the identifiers for each UI element in the app, coding them within the PageObject doesn't sound too good. Creating a repository of all...

Stopping ASP WebDev and Selenium servers from command line

I am introducing Selenium tests into my build for the first time. I figured that to do this in NAnt, I would have to start the WebDev server first: <exec program="path/to/WebDev.WebServer.exe" commandline="/port:51150 /path:path/to/website" failonerror="true" resultproperty="selenium.webdev.server.running" spawn="true"> </ex...

Is there a good IE-based Selenium IDE?

The SeleniumIDE project is based on Firefox (and its plugin architecture). My application (for a variety of reasons) only runs on Internet Explorer (6+). In fact, we actively check for non-IE browsers and do an immediate redirect. This is a 6 yr old codebase and we're trying to remove all of the html idiosyncrasies that necessitat...

How to handle dialog box through selenium with python?

Hi, I am new in Selenium automation. Could you please explain me how to use this (if one exists) tag? It would be really helpful if you can give example. The scenario where I am facing problem is: there is a save button, if we click on it a dialog box pops up. I need to enter some text in two text boxes and press save/cancel button on ...

how to impersonate a windows domain user for automated web testing?

we are about to build several UI test with selenium-rc and the java client the app itself is a classic asp web application that uses integrated security to retrieve the user's permissions from a database, and then, according to those permissions, displays a menu with the appropiate options. we'd like to automate that test, something li...

Selenium - getBodyText() return empty string

I'm trying to save the whole html page with getBodyText into a String and then write it to a file (.txt). However when I check the file, it's empty. Here's my code: String store_report = selenium.getBodyText(); File f = new File("C:/folder/" + "report" + ".txt"); FileWriter writer = new FileWriter(f); writer.append(store...