selenium

How can I Unit-test the behaviour of the HandleError attribute for a controller method?

I'm trying to verify the behaviour of my ASP.Net MVC app when an unexpected error occurs. Specifically, I'm trying to verify that the user is directed to the error page I've defined for my app. The problem I'm encountering is that I'm not able to verify the behaviour of the controller method as expected. For my normal behaviour tests, I...

Selenium Flex API issue

Hi i am using selenium flex API integrated selenium RC.After launching the Flex application selenium fails to identify the fields inside the module box on the login page. Eror trace: com.thoughtworks.selenium.SeleniumException: ERROR: Error: The element 'logonId' was not found in the application Can you please provide a solution on th...

selenium-rc in bsd

I'm trying to run selenium-rc in bsd and get the following error 12:45:40.740 WARN - POST /selenium-server/driver/ HTTP/1.1 java.lang.RuntimeException: Firefox couldn't be found in the path! Please add the directory containing 'firefox-bin' to your PATH environment variable, or explicitly specify a path to Firefox like this: *firefox /b...

Selenium RC and clicking on Panel links!

Hi, I'm trying to click on the panel links (links in the same page but different panel) in the page using Selenium RC. I'm able to do it by using: browser.waitForCondition("selenium.isElementPresent(\"id=placeOrderLink\")", "30000") but I want to make it generic and I tried to use: String var="placeOrderLink"; browser.waitForConditi...

how to increment field value each time selenium test is run?

is there any simple way to increment for example field value by +1 every time Selenium test is run through Selenium IDE? Command: Type Target: some kind of id Value: number+1 EDIT 1 :thanks for a reply krosenvold. i got your idea and this is a simplified version of what i got so far: ... store | 10 | x storeEval | storedVars['x...

Programmatically remove Firefox's license agreement dialog

I am running regression tests with Selenium and am automatically launching instances of Firefox. The problem is my tests get stuck because of Firefox's license agreement dialog: . I can't click with the mouse because I am in an headless environment with a virtual graphical environment. I would like to know what Firefox's file can I e...

Selenium typeKeys strips out dot from the String being typed

The following instruction Selenium.typeKeys("location", "gmail.com"); types the string gmailcom instead of gmail.com. What's happening there? From the comments: I am trying to simulate autofill and the only way to do it currently on selenium is to combine type and typeKeys. eg: selenium.type("assigned_to", split[0]+"@"); selenium.t...

Selenium adding weird characters to the end of javascript in a form field

I'm trying to set up a field to prepopulate with a unique set of characters, so that i can automatically generate test accounts. Because of the way the system is set up, the name field must be unique, and must not include numerical characters. I put together this selenium code, and it works 99% of the way, but leaves extra garbage ch...

Is there a way to run Bamboo tests simultaneously??

Currently, I have two selenium-junit tests configured to run on bamboo about the same time. One test runs on MachineA (selenium etc. installed) and the other on MachineB (selenium etc. installed). When kicked off, bamboo builds the one on machineA and enqueues the one on machineB. My question is why cant bamboo handle multithreading? or ...

save an image with selenium & firefox

i'm trying to save an image from a website using selenium server & python client. i know the image's URL, but i can't find the code to save it, either when it's the the document itself, or when it's embedded in the current browser session. the workaround i found so far is to save the page's screenshot (there are 2 selenium methods for ...

Use selenium to click on a swf

I'm trying to use Selenium IDE to click on a swf in a html page. The DIV id and Embed id change depend on the timestamp e.g. id="FLASH_0_23458974594", I've tried using id=/^FLASH_([0-9]+_)0-9/ or id="FLASH_glob:*" but the IDE is not picking up the swf. Am I doing something wrong here? Thanks. ...

Automated GUI Testing: Meeting Us Halfway

I've been tasked with developing a system for automated GUI testing and I could use some advice. As luck would have it, we are in the midst of a major redesign of our GUI and the developers doing the work are open to making their code more friendly to automation. My problem is that I'm not sure what to ask them to add. Whatever hooks are...

Selenium Test Suites

I have been running test cases in Selenium IDE using Firefox. This works quite well however when I create a suite by "adding test cases" I can never get the suite to execute. I can't figure out if the problem is with Selenium or me. Any advise for this novice. ...

Selenium Run Times

I'm trying to figure out what the syntax is to record the times it takes to run a test script in Selenium IDE. How do I record the start and end times in the script (using html)? ...

Is it worth the effort to write tests that work with the browser (like using selenium or something)?

It's pretty clearly worth it to write tests for stuff that happens on the server side, but I've heard that it is really hard to write unit test for UI stuff and that they are fragile and unreliable. I would love to have more confidence that changes that I make don't break major parts of import pages on my site though. Any thoughts or e...

Getting error running selenium tests

this is the error i'm getting when i tried to run my selenium script through a build.xml on a network server @BeforeTest Setup java.lang.RuntimeException: Could not start Selenium session: Internal Server Error at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89) at com.doubleclick.richmedia.selenium.InpageEndT...

How do I disable images and Flash from loading when using Selenium with Firefox?

When running selenium tests through Selenium RC in Firefox 3, the instance of Firefox that launches to run the tests in always displays images even though I've setup Firefox 3 to not display images. Do anyone know how to disable the images from loading? I'd also like to disable flash from loading on the test pages as well. ...

having javascript force a Selenium test to fail

Is there a way for js code to force Selenium testing to fail? For (a probably bad) example, if I had the following: return document.getElementById('foo').innerHTML == 'hello' is there a way I could make the 'runScript' command fail depending on if the js code returned true or false? (I know that example could be used by other Selenium...

service that takes xxx.1.2.3.4.theservice.com and resolves to IP 1.2.3.4

Does anyone know of a free service that's out there that takes xxx.1.2.3.4.theservice.com and resolves to IP 1.2.3.4? I need this so that I can launch ec2 boxes and point my selenium test scripts at them. I would just use IPs but I need the subdomains to work. Or is there some alternative way to accomplish the same goal? I don't want to...

What's the correct format to extract an attribute from an element of some id using selenium.getAttribute()?

I've tried tracking down the appropriate syntax to extract an attribute using selenium.getAttribute(someXPath), and while I've come across many examples, nothing seems to work. From what I can tell, standard xpath syntax, such as: //*[@id='someID'] doesn't work. What's the correct format to extract an attribute from an element of some...