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.

how to capture the tab navigation to the next field on a form?

tsivatsiva Members
edited November -1 in Sahi - Open Source
I need to verify whether a confirm pop-up is displaying on leaving the current field. I need to enter a value in client Id field on a new client form and the entered value will be validated in the database before creating the new Id. So this validation will be done only after confirming from the confirmation popup. So i need to verify whether the pop-up is displaying or not immediately after entering the Id value. For that i hit tab after entering the value and check for the popup. I need a help to capture this action in my new client setup form. I appreciate if someone could respond as soon as possible. Thanks in advance..

Comments

  • Hi

    so the popup automatically pops up when you entered something in the textfield and then focus on some other item? Maybe you try the _focus API http://sahi.co.in/w/browser-action-api
    _focus($inputfield);
    _setValue( $inputfield, $clienID);
    _focus($someOtherElement); //or _blur($inputfield)
    _assertExists(_popup($id));
    

    Does this help?

    Regards
    Wormi
  • tsivatsiva Members
    Hi globalworming,
    thanks for your response but that doesn't work.
    _focus or _blur doesn't work here. Basically onchange event will fire the open pop-up action. So _focus on next field doesn't work. Could you think of anything else?
  • globalwormingglobalworming Moderators
    edited April 2012
    Did you try it? I already encountered this problem here: http://sahi.co.in/forums/viewtopic.php?id=3542

    focus the input field first, set a text and wait a sec
    does this solve your issue?

    Alternatively... with _call() you might be able to fire the onChange event.


    Regards
    Wormi
Sign In or Register to comment.