Click Submit button not working in Firefox

2 posts, 0 answers
  1. Craig
    Craig avatar
    12 posts
    Member since:
    Jun 2011

    Posted 26 Jul 2011 Link to this post

    Good Afternoon,

    I am trying to write a simple test to launch a web page, enter some information and then click Submit, launching another page. I have written these steps as a combination of 1 custom coded step to launch the first web site and input values, then a second recorded step to click the "Submit" button. 

    When I execute the test, everything works fine in IE, but as soon as I try Firefox, the click button step hangs/times out and then writes an error. I do not understand why Test Studio cannot find this button in Firefox, but all works well in IE.

    I am using IE9 and Firefox 5.

    Please advise, we are evaluating the Test Studio tool for use in our organization and need to move forward quickly.

    Here is the log message:

    Overall Result: Fail
    '7/26/2011 3:34:46 PM' - Starting execution....
    '7/26/2011 3:34:48 PM' - Detected custom code in test. Locating test assembly: CFIA_NextGen.dll.
    '7/26/2011 3:34:48 PM' - Assembly Found: C:\Users\n0145732\Documents\Test Studio Projects\CFI_NextGen\bin\CFIA_NextGen.dll
    '7/26/2011 3:34:48 PM' - Loading code class: 'TestHarness'.
    '7/26/2011 3:34:49 PM' - 'Pass' : 1. [TestHarness_CodedStep] : New Coded Step
    '7/26/2011 3:35:00 PM' - 'Fail' : 2. Click 'Submit'
    Failure Information: 
    Unable to locate element. Details: Attempting to find [Html] element using 
    Find logic 
     (Html): [tagname 'Contains' input] AND [value 'Contains' Submit Query]

    Unable to locate element. Search failed!

    '7/26/2011 3:35:00 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
    '7/26/2011 3:35:00 PM' - Overall Result: Fail
    '7/26/2011 3:35:00 PM' - Duration: [0 min: 11 sec: 683 msec]
    '7/26/2011 3:35:01 PM' - Test completed!

    and here is the html definition of the button:

    <input type="submit" onClick="callNextGen(false)"/>

  2. Anthony
    Anthony avatar
    19 posts

    Posted 26 Jul 2011 Link to this post

    Hello Craig,

    It seems Firefox is rendering the HTML slightly differently, causing the Find Expression for that element to fail in FF. You can easily Change How the Element is Found to make it consistent across browsers.

    "Unable to locate element" is a common test automation problem. Please see this page for more information. We also have a section that gives examples of Browser Inconsistencies.

    If you continue to have difficulty and the site you are testing is publicly accessible, please attach your test files (or entire project) in a zip file. You could create a support ticket which, unlike this thread, is confidential.

    If remote access is not possible, you can "Export Result to File" from the Step Failure Details dialog and attach the zip file.

    Kind regards,
    the Telerik team
    Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!

    Have you looked at the new Online User Guide for Telerik Test Studio?
Back to Top