selenium

Testing for javascript alerts with Capybara

I'm using Cumcumber + capybara + selenium to run automated testing, but I'm having trouble finding a way to assert that a javascript alert is displayed. This question seems has a solution with selenium, but I can't figure out how to call the selenium object using Capybara. Is there a simple way to test for alerts using Capybara? Or i...

Native Mouse events with Flash and Selenium

I understand that Selenium does not support Flash, but it is my understanding that I should be able to do some simplistic testing of Flash by using Selenium's built in native mouse support and doing mouse up/down events based on coordinates. Is this correct? I can't seem to get it working. I'm trying to test on this page: http://mandy-m...

checking if all elements in a drop down menu are present with selenium testing using ruby?

HI how can i check if all elements in an array i created are present in a drop down menu using selenium testing? i have something like this but dosent seem to work ANIMALS = ["snake","cat","dog"] def validate_all_animals_exist(selenium) ANIMALS.each { |animal| assert selenium.is_element_present(animal), "Expected category [#{anim...

How can I search for a text and fill/click on a link with Selenium?

Here's the deal: Is there a way to search for an input name or type witch is not precise and fill it? For example, I want to fill any input with the name email with my email, but I maybe have some inputs named email-123, emailemail, emails etc... Is there a way to do something like * email * ? And how can I click on a link verifying ...

Checking if an element is visible in Chrome using Selenium Remote WebDriver

Is there a cross browser solution to check if an element is visible using WebDriver? The solution for IE and firefox is to cast the object to a RenderedRemoteWebElement and then call the property Displayed. I'm using the following methods to return if a element is visible: /// <summary> /// Check if the control is visible. /// </summa...

Selenium RC tool giving exception for opening secure http page .

Hi, I am newbei for selenium RC tool. i am going to automate my process which is basically based on browser. i have written script for automate process and it is working fine.When script is going to open HTTPS :(Secure page) , at that time it is not opening page becoz of security exception, for that it is asking for security certificate...

Webdriver with Python

I had written a scipt in Java with Webdriver and it worked fine and below is the code for the sample import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverBackedSelenium; import org.openqa.selenium.firefox.Fire...

What's the best practice to setup testing for ASP.Net MVC? What to use/process/etc?

hi there, i'm trying to learn how to properly setup testing for an ASP.Net MVC. and from what i've been reading here and there thus far, the definition of legacy code kind of piques my interests, where it mentions that legacy codes are any codes without unit tests. so i did my project in a hurry not having the time to properly setup un...

Get scrollheight cross-browser through Selenium

Hi, I'm working on a project which is using Selenium and I'd like to try to get the full web page height cross-browser and cross-platform. IE8 is being stubborn as always, is there anybody who has an idea of how to solve this? The problem: When you scroll down a page for e.g. 500px and you keep doing this until the bottom of the page, t...

How do you use Selenium to execute javascript within a frame?

I have a page (index.html) which has a frame: <html> <body> <iframe src="otherPage.html" /> </body> </html> And the otherPage.html has the contents: <html> <head><link src="jquery-min.js" type="text/javascript" /></head> <body><div id="main">Contents</div></body> </html> I am attempting to use the following selenium code on index.h...

What is the best way to assert redirections in Selenium?

I am writing a selenium test and I need to assert that the page is redirected. How should I verify this? What would be the best way? I am using PHPUnit and the PHPUnit_Extensions_SeleniumTestCase. ...

How to return a whole column with Selenium?

I know that Selenium has a built-in method getTable("tableName.row.column") can return a cell conveniently. However how can I return a whole column? I've tried getText() directly, however only the first cell was returned, getText("//tbody[@id='recordsTable']/tr[contains(@class, 'someclass')]") But getXpathCount() with the same Xpath ...

Selenium Testing

Hi I want to get a bunch of dom-objects with xpath and loop through those to check if they contains a specified text, is this possible in the Selenium IDE or rc? Perl is my prefered language XPath would be something like xpath=//tbody[@class='table-data']/tr/td/div[@class='table-item'] This would return all row items in the table, but...

Selenium: IE7 Not Launching

I am gettnig the exception: "Failed to start new browser session: error while launching browser" when trying to run a test suite with IE7. Info: python binding using cygwin I tried doing "*custom path_to_browser" and even printed out the path to browser directory in selenium module's do_command() function using os.listdir, and can ...

selenium vs phpunit/lime?

i have seen the power of selenium and that it can give you the tests in different languages. so the question is, why should i use phpunit or lime (for symfony) when a solution like selenium is available? isn't it time-consuming to write all the tests by hand, when you can just use selenium? thanks. ...

Transform code user-extensions.js in java code in Selenium IDE

Hello! I created a user-extension.js with a internal command... (step to take an evidence). When I try to export the Selenese to Java (JUnit) I'd like see the real Java command that I need use. Someone have an direction to me? Best Regards! ...

checking current selection or value in a dropdown list using selenium

HI i was wondering if there is a way to check what is the current selected value in a drop down list using selenium ruby? thanks ...

How to setup Selenium WebDriver working with selenium-webdriver gem

Surprisingly, I couldn't find a first step guide on how to setup Selenium WebDriver working with selenium-webdriver gem through google university. I suppose the gem needs to know where I store all those jar files to get started. How can I configure this? ...

Cucumber, capybara and selenium - Submiting a form without a button

I have a test using Cucumber, capybara and selenium driver. This test should go to a form and submit it. The normal text would be Scenario: Fill form Given I am on the Form page When I fill in "field1" with "value1" And I fill in "field2" with "value2" And I press "OK" Then I should see "Form submited" The probl...

Selenium IDE and telling it to record actions

I am trying to make a little application to allow to record actions within a Flash and Silverlight application. In such manner that you can compile your interactive application in test-mode and then be able to click on elements which then passed the action to Selenium IDE which then adds this command to the testcase. I am curious if thi...