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.

skipping a step while play back

mr.amitvpatilmr.amitvpatil Members
edited November -1 in Sahi - Open Source
Im a new bee to Sahi and I find it amazingly interesting to work with. I'm being exploring with record and playback with implementation of API's on forms. While recording on my project I encountered a problem where after a record step _popup("Vyerbn8AAAEAADsEFIcAAAAB")._click(_image("Billing")); there's a menutext thats populated. When I click on the one of the options from the menutext I'm navigated to a new page in the same browser. The issue is that the clicking the option from the populated menutext is not being recorded. I suppose its and ExtJs object. Hence while play back my script gets stuck at this point and hence doesn't happen to move to the next step of the script. So, what I want to do is at this particular point I want sahi to skip the step and automatically move to the next step in the script. Is it possible to achieve this with Sahi? Or can I use any JS that can be used as an API for Sahi that can automatically execute the next step?

Comments

  • narayannarayan Administrators
    Amit,

    The problem is with _popup("Vyerbn8AAAEAADsEFIcAAAAB")._click(_image("Billing"));

    The name of the window to _popup seems to be a randomly generated window name. Instead, use the title of the popup window. (The title is what you see on the top blue bar of the window)
    So your step may look like

    _popup("title of billing window")._click(_image("Billing"));

    Steps when they fail, will automatically either stop the script or move to the next line.
    The only exception is when a step is executed on a window which Sahi is unable to find, in which case Sahi waits for a long time for the window to come up and then will fail. This may appear as if Sahi is stuck.

    In your case Sahi keeps waiting for _popup("Vyerbn8AAAEAADsEFIcAAAAB") but most probably the window name has changed during playback. Use the window title instead of name and it may work correctly.

    Regards,
    Narayan
  • The problems not with the window name. Even if the window name is set correctly sahi fails to record my particular event where I'm clicking an option from the menu text. A list of options displayed in a menu. Probably thats populated using CSS. The options in menu text population happens after the event _popup("title of billing window")._click(_image("Billing"));

    As the event of clicking the option from menu text isn't recorded, so during the playback the script waits for long after the step _popup("title of billing window")._click(_image("Billing"));
  • narayannarayan Administrators
    Can you paste the failing portion of the script here? I am unable to understand the sequence of events. Please specify the actions that take place after each line of script too.

    Thanks,
    Narayan
  • mr.amitvpatilmr.amitvpatil Members
    edited December 2009
    _popup("P: athenaCollector v9.17 OH - Professionals for Women's Health [87]")._click(_div("by iddobssnnameguaranins#phone#record#"));
    _popup("P: athenaCollector v9.17 OH - Professionals for Women's Health [87]")._click(_image("Billing"));

    AFTER THE ABOVE STEP THE PLAY BACK FAILS, AS THE SCRIPT IS NOT RECORDED WHILE RECORD, SO PLAYBACK WAITS FOR LONG HERE. SO I WANNA JUMP TO NEXT STEP DIRECTLY

    _popup("P: athenaCollector v9.17 OH - Professionals for Women's Health [87]")._navigateTo("/billing/managetosmoney.esp");
Sign In or Register to comment.