selenium

How to test with selenium the creation of posts of wordpress and what happens in the frontend?

I am using Selenium RC and I have a test case creating posts and checking in the frontend (public side) if the posts were created and how they are rendered. But even if I log in at the beginning of the test case when I call the open command to go to wp-admin I am sent to the log in page. Why is the open ignoring that I am already authe...

JavaScript: execute code in a specific context

How I can execute a JavaScript function/piece of code in a specific context which it would see as a global context? This is not the same as changing this (call/apply), this is more like changing 'window'. Basically, if I have the following code: (function() { x.value = 5; return value; })() is there a way to make it work (return 5) w...

Testing ASP.NET sites using master pages with Selenium

What is a good approach to avoiding Selenium tests being broken when dealing with the changing "Name" and "Id" attributes of a control that is rendered on a ASP.NET page using a master page? I want to avoid changing my tests when ASP.NET renders the web page's controls with different DOM identifiers. ...

Using Selenium for selecting an option on a select with optgroup

Hi, I'm trying to select a value in a select element. I'm using Selenium RC (Java) to run the test cases. I understand that the code for selecting a value is given by: selenium.select("locator", "value=REQUIRED VALUE") I'm unable to select the desired value with the above code. I think it might be something to do with optgroup in the...

Symbol not found: when running selenium with maven

Hi I'm getting a symbol not found error, when running mvn -e integration-test. Why could this happen if the package is in my repository? I have tried downloading it and installing it manually but it does not make a difference. Is this a common error in maven? I'm using vista home edition, Error message [INFO] ------------------------...

How to use Selenium IDE with tabular data and pagination?

Hi I used to record tests ion selenium IDE for after export in selenium/rspec formt to run all them with Selenium RC. Now, I aquire a doubt when I was recording some test of crude operation of data in table with pagination. For example, supose that I have a table of customers thats can show 10 itens per page and there nineteen custome...

Help with Selenium Maven Cargo

I am trying to use cargo to deploy and start my container (which works fine), and then use selenium to execute some UI tests. Whenever I try to run (mvn clean integration-test), I get to the point where it says Launching Selenium Server Waiting for Selenium Server... [INFO]Redirecting output to [INFO]User extensions But then my integ...

Selenium RC and input control events

We have web ui project in MVC and for automated testing we are using Selenium, its a brilliant tool. But I am facing some problem in raising events with Selenium. Scenario: I have a textbox which expects +ve value and bubbles up an error (javascript) when entered any -ve value and we hit tab from that textbox or clicked outside anywher...

selenium: delete all visible cookies raises an exception

I am using selenium with a python client. When doing selenium.delete_all_visible_cookies I get the exception: ERROR: Command execution failure. Please search the forum at http://clearspace.openqa.org for error details from the log window. The error message is: malformed URI sequence The log window's error is: error(125...

Internet Explorer 8 64bit and Selenium Not working.

I am trying to get selenium tests to run. Yet every time I try to run a tests that should run IE I get a error on line 863 of htmlutils.js It says that I should disable my popup blocker. The thing is I went to IE tools-> turn of popup block. So it is disabled and I get this error. Is there something else I need to disable. I actually d...

Selenium IDE focus event doesn't fire unless window is active

I added this code to my web page: <input id='argh' type='text' onfocus='this.value=7'> Unless the browser window is active, the focus event does not seem to fire (using the 'focus' command) from Selenium: # [info] Executing: |waitForElementPresent | argh | | # [info] Executing: |focus | argh | | # [info] Executing: |verifyValue | arg...

How to resize Firefox window when Selenium is running?

I am using Selenium Remote Control and I hate when it starts running the tests when the actual Firefox window is so small. I want it full screen so I can see what is happening. How can I make it so it loads full screen? ...

Selenium command ordering for one-after-another JavaScript prompts

One script we have asks the user for a few values via successive JavaScript calls to window.prompt(). Selenium records this action, both the prompt texts and the values I typed in, but it doesn't seem to be able to play it back properly. It 'succeeds' in that no errors occur, but only the first prompt value actually makes it back to my...

In firefox browser, type_keys(locator,value) method from selenium escapes the last character from the "value" provided.

Hi, I am working on selenium for automation web application testing. I want make a key stroke event while entering the values in the textfield I tried the following @browser.type(auto_complete_field_locator, auto_complete_field_value) @browser.type_keys(auto_complete_field_locator, auto_complete_field_value) and it worked in the ...

"SessionId doesn't exist" error when starting Selenium server

I'm raising a Selnium-server (the jar), and getting this exception without trying to talk to the server. What can be the cause? The errors keep coming in once every 2 seconds. Could this be some leftover from a previous Selenium run? C:\Foo>java -jar ..\..\..\..\lib\Selenium\selenium-server.jar 14:53:30.141 INFO - Java: Sun Microsystems...

Selenium Test Commandline

How do i post the results to a URL via the "selenium-server.jar" java -jar selenium-server.jar -htmlSuite "*firefox" "https://www.myserver.com/rc/" "/selenium/Tests/TestSuite2.html" "http://myserver.com/readSeleniumResults" chrome://src/content/TestRunner.html?auto=true&multiWindow=true&defaultLogLevel=info&baseUrl=https%3A%2F%2Fwww.my...

YUI Test: How to simulate more complicated user actions in JavaScript?

I have a number of tests written with YUI Test. YUI Test capabilities when it comes to simulating users' actions are quite limited, or rather fairly low level. For instance, I can't easily simulate the user typing in a text field, with the events and modifications to DOM objects that go with it. This is something that Selenium does much...

xPath in Selenium - what am I doing wrong?

I have a page with the following snippet in the HTML: ... <tbody id="c_scopePane4_tbody"> <tr id="c_scopePane4_tr_header"> ... </tr> </tbody> ... Now I'm trying to specify the <tr> tag with an XPath expression from within Selenium. Here's what I try: //tr[@id='c_scopePane4_tr_header'] This tells me [error] locator not found: //t...

(i'm close - i think) Python loop through list of subdomains with selenium

Hi, starting with a base URL, I'm trying to have selenium loop through a short list of subdomains in csv format (ie: one column of 20 subdomains) and printing the html for each. I'm having trouble figuring it out. Thanks! from selenium import selenium import unittest, time, re, csv, logging subds = csv.reader(open('listofsubdomains.txt...

How to apply Loop to working Python Selenium Script?

Hi, I'm trying to figure out how to apply a for-loop to this script and I'm having a lot of trouble. I want to iterate through a list of subdomains which are stored in csv format (ie: one column with 20 subdomains) and print the html for each. They all have the same SourceDomain. Thanks! #Python 2.6 from selenium import selenium impo...