Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

How to click on the button that is not recorded in the recorder

glgsol01yglgsol01y Members
edited June 2013 in Sahi - Open Source
Hi, i came across this problem when i was trying to submit a form.

After i click on the submit, a Security Warning pop-up with 2 buttons ("Continue" and "Cancel") appear.
i tried to ctrl+hover to the "Continue" button but nothing was recorded in the recorder.

tried using _popup("Security Warning")._click(_button("Continue")) but it's not working.
tried using _expectConfirm("Are you sure you want to continue sending this information?", true) but it did not click on "Continue" and close the pop-up.

please help

Answers

  • Hi glgsol01y,
    I tried this out on Sahi OS 4.4 which is the latest released version and it worked fine for me.

    I have written a sample script for you. Please have a look at it.

    _navigateTo("http://sahi.co.in/demo/confirmTest.htm";);
    _setValue(_textbox("t1"), "");
    _expectConfirm("Some question?", true);
    _click(_button("Click For Confirm"));
    _assertEqual(_getText(_textbox("t1")), "oked");
    _expectConfirm("Some question?", true);
    _click(_button("Click For Confirm"));
    _expectConfirm("Some question?", false);
    _click(_button("Click For Confirm"));
    _assertEqual(_getText(_textbox("t1")), "canceled");

    If this still doesn't work for you, please attach your script and testpage.

    Regards.

  • Hi Pratyush_Tyto,

    i'm not able to navigate to the pop up as i can't find the URL, and i'm not able to view the source code too..

    Not able to attach a screenshot here. Basically this pop up has title = "Security Warning"
    Message in pop up = "Although this page is encrypted, the information you have entered is to be sent over an unencrypted connection and could easily be read by a third party.
    Are you sure you want to continue sending this information?"

    and a "Continue" and a "Cancel" button.
  • hi, have you found a solution for this yet?
  • i think the issue here is, due to the page being a request, sahi cant pump in the javascript needed to recognise the element - therefore to SAHI, this window does not exist
Sign In or Register to comment.