Search Results

Search found 452 results on 19 pages for 'selenium webdriver'.

Page 10/19 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Selenium testing with checksums (md5)

    - by Peter
    I am new at selenium testing and am writing a bunch of tests for a webpage that relies heavily on javascript user interaction. At first I wrote a lot of assertions of the style If I press button A" then assert number of visible rows = x, assert checkboxes checked are such assert title = bar .... [20 more] and so on. Then I switched to checksumming the HTML using MD5: If I press button A" then assert md5(html) = 8548bccac94e35d9836f1fec0da8115c. And it made my life a whole lot easier... But is this a bad practice in any way?

    Read the article

  • Spring Roo unable to generate Selenium tests because of Xerces error

    - by Wraith
    After watching Roo Google IO, I decided to try it out using this tutorial, but I'm getting stuck when trying to create Selenium tests. ~.web roo> selenium test --controller ~.web.PizzaOrderController Created SRC_MAIN_WEBAPP/selenium Created SRC_MAIN_WEBAPP/selenium/test-pizzaorder.xhtml Created SRC_MAIN_WEBAPP/selenium/test-suite.xhtml Undo create SRC_MAIN_WEBAPP/selenium/test-suite.xhtml Undo create SRC_MAIN_WEBAPP/selenium/test-pizzaorder.xhtml Undo create SRC_MAIN_WEBAPP/selenium com.sun.org.apache.xerces.internal.dom.DeferredCommentImpl cannot be cast to org.w3c.dom.Element A person at this forum suggested removing Xerces from the classpath because Java 6 has its own XML parser based on Xerces. However, I haven't come across a clear way to remove something from the classpath, only setting it (which I think would be tedious each time). Does anyone know of a clear way to remove jars from the classpath? Has anyone encountered this Roo problem before and solved it another way?

    Read the article

  • Selenium RC htmlsuite error with IE

    - by Alina
    I am trying to use Selenium RC but i keep getting this error whenever i start the server. "HTML suite exception seen: java.lang.RuntimeException: sessionId 7643 doesn't exist; perhaps this session w as already stopped?" The command I use is java -jar C:\selenium-remote-control-1.0.3\selenium-server-1.0.3\selenium-server.jar -multiwindow -htmlSuite "*iexplore" "https://user1.apps.com/" "C:\TEMP\Selenium Tests\TestSuite1.html" "C:\TEMP\Selenium Tests\results.html" However with the same command if I change *iexplore to *firefox then it works. I need to run the test with IE, please help!Many thanks!!

    Read the article

  • Help needed wit the XPath statement for Selenium test

    - by mgeorge
    I am testing a calendar component using selenium.In my test i want to click on the current date.Please help me with the XPath statement for doing that.I am adding the HTML for the calender component <input id="event_date" type="text" on="click then l:show.event.calendar" style="border: 1px solid rgb(187, 187, 187); width: 100px;" fieldset="new_event" decorator="redbox" validator="date"/> <img id="app_136" style="position: relative; top: 2px;" on="click then l:show.event.calendar" src="images/calendar.png"/> <div id="app_137" style="margin: 0pt; padding: 0pt;"> <div id="app_calendar_2" class="yui-calcontainer single withtitle" style="position: absolute; z-index: 1000;"> <div class="title">Select Event Date</div> <table id="app_calendar_2_cal" class="yui-calendar y2010" cellspacing="0"> <thead> <tr> </tr> <tr class="calweekdayrow"> <th class="calweekdaycell">Su</th> <th class="calweekdaycell">Mo</th> <th class="calweekdaycell">Tu</th> <th class="calweekdaycell">We</th> <th class="calweekdaycell">Th</th> <th class="calweekdaycell">Fr</th> <th class="calweekdaycell">Sa</th> </tr> </thead> <tbody class="m6 calbody"> <tr class="w22"> <td id="app_calendar_2_cal_cell0" class="calcell oom calcelltop calcellleft">30</td> <td id="app_calendar_2_cal_cell1" class="calcell oom calcelltop">31</td> <td id="app_calendar_2_cal_cell2" class="calcell wd2 d1 selectable calcelltop"> </td> <td id="app_calendar_2_cal_cell3" class="calcell wd3 d2 today selectable calcelltop selected"> <a class="selector" href="#">2</a> </td> I want to click the date component described in <td id="app_calendar_2_cal_cell3" class="calcell wd3 d2 today selectable calcelltop selected"> <a class="selector" href="#">2</a> </td> Thanks in advance mgeorge

    Read the article

  • RSpec + Selenium tests for .NET on Windows

    - by John
    I'm a Rails developer doing TDD on a Mac with RSpec, Capybara and Selenium webdriver. Now I have been asked by my company to use this approach for a .NET on Windows environment. What is the best way of doing this? I could just install Ruby and use RSPEC, Capybara and Selenium webdriver for integration testing. But what about unit tests? I also looked at NSpec, but I'm not sure if I can combine that with Capybara or Selenium for integration tests. What would be a good approach here?

    Read the article

  • Use external datasource with NUnit's TestCaseAttribute

    - by Hamman359
    Is it possible to get the values for a TestCaseAttribute from an external data source such as an Excel Spreadsheet, CSV file or Database? i.e. Have a .csv file with 1 row of data per test case and pass that data to NUnit one at a time. Here's the specific situation that I'd like to use this for. I'm currently merging some features from one system into another. This is pretty much just a copy and paste process from the old system into the new one. Unfortunately, the code being moved not only does not have any tests, but is not written in a testable manner (i.e. tightly coupled with the database and other code.) Taking the time to make the code testable isn't really possible since its a big mess, i'm on a tight schedule and the entire feature is scheduled to be re-written from the ground up in the next 6-9 months. However, since I don't like the idea of not having any tests around the code, I'm going to create some simple Selenium tests using WebDriver to test the page through the UI. While this is not ideal, it's better than nothing. The page in question has about 10 input values and about 20 values that I need to assert against after the calculations are completed, with about 30 valid combinations of values that I'd like to test. I already have the data in a spreadsheet so it'd be nice to simply be able to pull that out rather than having to re-type it all in Visual Studio.

    Read the article

  • Selenium IDE - There was an unexpected Confirmation!

    - by Ula Krukar
    I have a button that displays Javascript confirmation popup. This is a part of my test case: <tr <tdclickAndWait</td <tdbuttonId</td <td</td </tr <tr <tdverifyTextPresent</td <tdObject has been deleted</td <td</td </tr It works as expected: OK is clicked automatically on a popup and verifyTextPresent return true. Still, I get [error] There was an unexpected Confirmation! in the log and test case fails. Any suggestions?

    Read the article

  • Maven Selenium HTTPS

    - by Walter White
    Hi all, I am testing my web application's security and all of my pages are served over ssl. The issue I am having is the certificate is not trusted as firefox starts in a new profile each time. I was reading on OpenQA's site about a jar and importing the certificate, but that is only for Internet Explorer and Firefox should automatically be handled. Is there anything special I need to do in order for certificates to automatically be trusted? Thanks, Walter

    Read the article

  • capybara selenium and JavaScript Destroy

    - by dorelal
    I am using rails 2.3.5 and this is what I did. I have latest cucumber, cucumber-rails and capybara installed. rails demo cd demo ruby script/generate cucumber --rspec --capybara ruby script/generate feature post title:string body:text published:boolean ruby script/generate scaffold post title:string body:text published:boolean rake db:migrate rake cucumber All the tests are passing. Now I want to test using Javascript. At this time this is how scenario looks like Scenario: Delete post Given the following posts: |title|body|published| |title 1|body 1|false| |title 2|body 2|true| |title 3|body 3|false| |title 4|body 4|true| When I delete the 3rd post Then I should see the following posts: |Title|Body|Published| |title 1|body 1|false| |title 2|body 2|true| |title 4|body 4|true| I added @javascript at the top. Now when I run rake cucumber then I see a confirmation page. But nothing happens until I click. What do I need to do so that OK is clicked automatically and test proceeds ahead.

    Read the article

  • Watir vs Selenium vs Sahi

    - by Dennis
    Out of these 3, which have you or has your company chosen to work with? Pros & Cons please. I'll be comparing them myself as well, but I'd like to hear what others have to say. Also, please state which you have all tried (so that I know you have a good comparison of the 3).

    Read the article

  • How to use Page Object pattern with Cucumber and Webrat / Selenium?

    - by Will Sargent
    I'm looking at a cucumber test suite that is somewhat brittle right now; many small steps, and no knowledge of the page itself. I'd like to factor out the logic involved in the step definitions inside a series of Selenium PageObjects. As seen here. However, because I'm using Webrat and not Selenium, everything has to go through the Webrat model. So I cannot do class MyPage < Selenium::WebPage end because that adds a direct dependency. So I have to route everything through Webrat while still maintaining the Selenium Page object goodness. No documentation on this that I can see: if someone has anything on Webrat + PageModel I'd love to see it.

    Read the article

  • How to get selenium to click on an object other than by ID

    - by Zombies
    So here is a little challenge. I have an image. It has 2 attributes: a random ID - not helpful an image url - but it is a button, and other buttons use the same image url, not helpful a CSS class - also used by too many other things to be helpful a style - neither helpful nor unique This image is however inside of an anchor tag, but the anchor tab isn't to a page, it just runs some javascript. Bellow is the html in question: <a id="template:j_id__ctru168pc2" title="Click for the Manual Class LOV" class="xei" style="text-decoration: none;" onclick="return false;" href="#"> <img id="template:j_id__ctru169pc2" class="xgs" style="border: 0pt none;" src="images/lov_ena.png"> </a> How can I click this image without using the ID?

    Read the article

  • selenium, get text from id

    - by user3766148
    on the following url - http://www.filestube.to/26frq-Buffalo-Clover-Test-Your-Love-2014-9Jai9TJFukAS9fq9sWngAD.html I am trying to copy the; Direct links: turbobit.net/9mrb0eu9eksx/26frq.Buffalo.Clover..Test.Your.Love.2014.rar.html via css path or xpath and unable to retrieve the information and store it to a variable. firebug gives me html body div.cnt div.rH.no-js.fd div.rl div.fgBx pre span#copy_paste_links but when I apply css=html.body.div.cnt.div.rH.no-js.fd.div.rl.div.fgBx.pre.span#copy_paste_links/text() to the target, I get error not found http://i.imgur.com/KdBmDHE.png

    Read the article

  • Are there any test data generator tools which can be used with selenium/Nunit?

    - by Jon
    Hi, I was wondering if there was anything that provides test data for injecting into Nunit tests? I'm sure I came across something recently that does this but I couldn't find it again. Basically the idea is that I could use selenium and Nunit to create new customers within the system automatically. So I could have selenium type in customer names generated from test generator (the < DataGenerator is just an imaginary class): e.g. dim sFirstName as string = < DataGenerator >.GetRandomFirstName() dim sLastName as string = < DataGenerator >.GetRandomLastName() selenium.type("firstname_field",sFirstName) selenium.type("lastname_field",sLastName ) I've already seen SQLDataGenerator from Redgate which has a cmd line wrapper class, but I was wondering if there was anything else.

    Read the article

  • How To Write Selenium Xpath

    - by user3690563
    I am Struck here. I am Trying a write Xpath for the Code in the image. I am Trying to click Browse TAB. Where the ID is changing every time. Help me guys. Thanks you in Advance I have tried this as my Xpath //*[@id='ext-gen43']/em/span/span <a id="ext-gen43" class="x-tab-right" href="#"> <em class="x-tab-left"> <span class="x-tab-strip-inner"> <span class="x-tab-strip-text ">Browse</span> </span> </em> </a>

    Read the article

  • Sending object C from class A to class B

    - by user278618
    Hi, I can't figure out how to design classes in my system. In classA I create object selenium (it simulates user actions at website). In this ClassA I create another objects like SearchScreen, Payment_Screen and Summary_Screen. # -*- coding: utf-8 -*- from selenium import selenium import unittest, time, re class OurSiteTestCases(unittest.TestCase): def setUp(self): self.verificationErrors = [] self.selenium = selenium("localhost", 5555, "*chrome", "http://www.someaddress.com/") time.sleep(5) self.selenium.start() def test_buy_coffee(self): sel = self.selenium sel.open('/') sel.window_maximize() search_screen=SearchScreen(self.selenium) search_screen.choose('lavazza') payment_screen=PaymentScreen(self.selenium) payment_screen.fill_test_data() summary_screen=SummaryScreen(selenium) summary_screen.accept() def tearDown(self): self.selenium.stop() self.assertEqual([], self.verificationErrors) if __name__ == "__main__": unittest.main() It's example SearchScreen module: class SearchScreen: def __init__(self,selenium): self.selenium=selenium def search(self): self.selenium.click('css=button.search') I want to know if there is anything ok with a design of those classes?

    Read the article

  • How Can i click on this element using XPATH in Web driver?

    - by Mike
    Here is the html..... <li> <input type="checkbox" checked="" name="selectedMstrPrivGroupList[9].mstrAuthorities[0].status"/> Add Dexter </li> How will I be able to click on this element. It is a check box. And I want to use XPath as I have close to 30+ checkboxes in the page, so that I can create a generic method and pass only the Webelement.. I tried the following but didn't work. Driver.findElement(By.xpath("//input[contains(.,'Add Dexter')]")).click(); Please help!! Thanks, Mike

    Read the article

  • How I can locate element depend on it value?

    - by Nikolay Kulakov
    I have some table: Title 1 | Title 2 | Title 3 | -------------------------------------------------- string value 1 | string value 2 | string value 3 | -------------------------------------------------- string value 4 | string value 5 | string value 6 | and some step: "And click on its < name", where < name can be anything from first column. So, how I can found needed element and click on its? Table code <div id="grid" class="k-grid k-widget" data-role="grid" tabindex="0" style=""> <div class="k-grid-header" style="padding-right: 17px;"> <div class="k-grid-header-wrap"> <table cellspacing="0"> <colgroup> <col style="width: 30px;"> <col style="width: 300px;"> <col> <col style="width: 200px;"> </colgroup> <thead> <tr> <th class="k-header" data-title="ID" data-field="id">ID</th> <th class="k-header" data-title="????????????" data-field="name" data-role="sortable" data-dir="asc"> <a class="k-link" href="#"> 2nd part ???????????? <span class="k-icon k-arrow-up"></span> </a> </th> <th class="k-header" data-title="????????" data-field="description">????????</th> <th class="k-header" data-field="undefined" data-role="sortable"> </tr> </thead> </table> </div> </div>

    Read the article

  • TestNG - Factories and Dataproviders

    - by Tim K
    Background Story I'm working at a software firm developing a test automation framework to replace our old spaghetti tangled system. Since our system requires a login for almost everything we do, I decided it would be best to use @BeforeMethod, @DataProvider, and @Factory to setup my tests. However, I've run into some issues. Sample Test Case Lets say the software system is a baseball team roster. We want to test to make sure a user can search for a team member by name. (Note: I'm aware that BeforeMethods don't run in any given order -- assume that's been taken care of for now.) @BeforeMethod public void setupSelenium() { // login with username & password // acknowledge announcements // navigate to search page } @Test(dataProvider="players") public void testSearch(String playerName, String searchTerm) { // search for "searchTerm" // browse through results // pass if we find playerName // fail (Didn't find the player) } This test case assumes the following: The user has already logged on (in a BeforeMethod, most likely) The user has already navigated to the search page (trivial, before method) The parameters to the test are associated with the aforementioned login The Problems So lets try and figure out how to handle the parameters for the test case. Idea #1 This method allows us to associate dataproviders with usernames, and lets us use multiple users for any specific test case! @Test(dataProvider="players") public void testSearch(String user, String pass, String name, String search) { // login with user/pass // acknowledge announcements // navigate to search page // ... } ...but there's lots of repetition, as we have to make EVERY function accept two extra parameters. Not to mention, we're also testing the acknowledge announcements feature, which we don't actually want to test. Idea #2 So lets use the factory to initialize things properly! class BaseTestCase { public BaseTestCase(String user, String password, Object[][] data); } class SomeTest { @Factory public void ... } With this, we end up having to write one factory per test case... Although, it does let us have multiple users per test-case. Conclusion I'm about fresh out of ideas. There was another idea I had where I was loading data from an XML file, and then calling the methods from a program... but its getting silly. Any ideas?

    Read the article

  • driver.findElement() with iframe and elements without ID

    - by user1864657
    Java Code: driver.switchTo().frame(0); WebElement elemText = driver.findElement(By.xpath("/html/body[contains(@class='forum')]")); //WebElement elemText = driver.findElement(By.xpath("//td[@id='cke_contents_vB_Editor_001_editor']/textarea")); elemText.sendKeys(message); elemText.submit(); forumLink = driver.getCurrentUrl(); HTML Code: <td id="cke_contents_vB_Editor_001_editor" class="cke_contents" style="height:1726px" role="presentation"> <iframe style="width:100%;height:100%" frameborder="0" title="Rich text editor, vB_Editor_001_editor, press ALT 0 for help." src="" tabindex="-1" allowtransparency="true"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" lang="en" contenteditable="true"> <head> <title data-cke-title="Rich text editor, vB_Editor_001_editor, press ALT 0 for help.">Rich text editor, vB_Editor_001_editor, press ALT 0 for help.</title> <base href="http://fairplay.garena.com/" data-cke-temp="1"> <link type="text/css" rel="stylesheet" href="http://fairplay.garena.com/clientscript/vbulletin_css/style00008l/editor_contents.css"> <style type="text/css" data-cke-temp="1"> form{border: 1px dotted #FF0000;padding: 2px;} img.cke_hidden{background-image: url(http://fairplay.garena.com/clientscript/ckeditor/plugins/forms/images/hiddenfield.gif?t=B37D54V);background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 16px !important;height: 16px !important;} img.cke_iframe{background-image: url(http://fairplay.garena.com/clientscript/ckeditor/plugins/iframe/images/placeholder.png?t=B37D54V);background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 80px;height: 80px;} img.cke_anchor{background-image: url(http://fairplay.garena.com/clientscript/ckeplugins/vblink/images/anchor.gif?t=B37D54V);background-position: center center;background-repeat: no-repeat;border: 1px solid #a9a9a9;width: 18px !important;height: 18px !important;} a.cke_anchor{background-image: url(http://fairplay.garena.com/clientscript/ckeplugins/vblink/images/anchor.gif?t=B37D54V);background-position: left center;background-repeat: no-repeat;border: 1px solid #a9a9a9;padding-left: 18px;} </style> </head> <body class="forum" spellcheck="true"> </body> </html> </iframe> </td> Image: http://s9.postimage.org/nwyvq3san/Screen_Shot038.jpg I can't find a way to get elements inside a iframe and without id. Can you help me?

    Read the article

  • Consecutive verse Parallel Nunit Testing

    - by Jacobm001
    My office has roughly ~300 webpages that should be tested on a fairly regular basis. I'm working with Nunit, Selenium, and C# in Visual Studio 2010. I used this framework as a basis, and I do have a few working tests. The problem I'm running into is is that when I run the entire suite. In each run, a random test(s) will fail. If they're run individually, they will all pass. My guess is that Nunit is trying to run all 7 tests at the same time and the browser can't support this for obvious reasons. Watching the browser visually, this does seem to be the case. Looking at the screenshot below, I need to figure out a way in which the tests under Index_Tests are run sequentially, not in parallel. errors: Selenium2.OfficeClass.Tests.Index_Tests.index_4: OpenQA.Selenium.NoSuchElementException : Unable to locate element: "method":"id","selector":"textSelectorName"} Selenium2.OfficeClass.Tests.Index_Tests.index_7: OpenQA.Selenium.NoSuchElementException : Unable to locate element: "method":"id","selector":"textSelectorName"} example with one test: using OpenQA.Selenium; using NUnit.Framework; namespace Selenium2.OfficeClass.Tests { [TestFixture] public class Index_Tests : TestBase { public IWebDriver driver; [TestFixtureSetUp] public void TestFixtureSetUp() { driver = StartBrowser(); } [TestFixtureTearDown] public void TestFixtureTearDown() { driver.Quit(); } [Test] public void index_1() { OfficeClass index = new OfficeClass(driver); index.Navigate("http://url_goeshere"); index.SendKeyID("txtFiscalYear", "input"); index.SendKeyID("txtIndex", ""); index.SendKeyID("txtActivity", "input"); index.ClickID("btnDisplay"); } } }

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >