18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Getting first parameter passed to _setValue was not found on browser

kishharikishhari Members
edited June 2009 in Sahi - Open Source
[Exception] Error: The first parameter passed to _setValue was not found on the browser

My Login page has 2 pages first page has 4 questions and the second page has password, the script is not able to write the value to password text box and it is giving the above error.

Please let me know what is the issue

Comments

  • narayannarayan Administrators
    Kishhari,

    Does the element passed to _setValue exist on the page?
    Seems like either the page is different from the one recorded, or Sahi is unable to identify the element that it incorrectly recorded. Can you paste that part of the Sahi script and the element's html code?

    Regards,
    Narayan
  • yes the _setValue exist in the page it is the password text.

    Here is the code for reference:

    _setValue(_textbox("login.domainName"), "virgin");

    _setValue(_textbox("login.userName"), "virgin@virgin.com");


    _click(_image("clear.gif"));

    _click(_div("Where were you born?"));

    _setValue(_textbox("login.answer"), "Foster City");


    _click(_button("Next"));

    _setValue(_textbox("login.userName"), "virginmediabeta_admin@virginmediabeta.com");

    _setValue(_password("login.password"), "vgyjqdcg"); @ this step is failing

    _click(_button("Sign In"));

    _click(_button("Logout"));



    HTML Code:

    <div class="s-loginformitem"> <div id="label.login.signIn" class="x-form-label s-loginformlabel">Password</div><input type="password" class="x-form-field x-form-text s-loginformtext s-loginformfield x-form-invalid" tabindex="1" id="login.password"/><div class="x-icon-btn x-nodrag x-form-invalid-icon" id="x-auto-35" style="visibility: visible; display: block; left: 965px; top: 234px;"/></div>
  • I am giving _wait(10000); at some points in the code but no use the script runs very fast and i also changed the time delay for everystep in shai.properties file but no use....
  • This is how we solve this problem:
    ~ At the end of every page create a <div id="[pageName]"> </div> or <input type="hidden" id=.....
    Example: <div id="page1"> </div>
    ~ then before doing any action on this page insert:
    _wait(20000, _assertNotNull("page1"));
  • My login page has only one page but different javascript action calls
  • narayannarayan Administrators
    Kishhari,

    Can you make this change in your script and check?
    _click(_button("Next"));
    _assertExists(_password("login.password")); // THIS LINE HAS BEEN ADDED
    _setValue(_textbox("login.userName"), "virginmediabeta_admin@virginmediabeta.com");
    

    Also, which browser are you using?

    Regards,
    Narayan
  • Firefox Browser Details:

    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)
Sign In or Register to comment.