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.

Recording alert box..or Confirm box...

prafullasurveprafullasurve Members
edited October 2009 in Sahi - Open Source
Hello Guys,

Picture this ,I have a login page and when I don't enter password and I click on submit, it prompts a msg box ("password is empty")...where I have to click on ok..

Now I am not able to record this click on ok on msg box..
Can you please let me know what's the reason for this and how can I overcome it?

This is required especially when it's a confirm message and depending upon user's click action(ok/cancel) a different web page is loaded..

Comments

  • Hi Narayan,

    I went through those pages.They were helpful.
    But My problem is during recording..

    I am testing for a page: http://www.w3schools.com/JS/tryit.asp?filename=tryjs_confirm
    I am checking for confirm box..

    When I click the button "Show a confirm box", it pops up a confirm box..
    and I can click ok /cancel there..

    Now when I record it through sahi controller, following script is getting generated..

    _expectPrompt("Please enter your name", "3")
    _expectPrompt("Please enter your name", "3")


    It has 2 problems..
    1] It did not record the click on "show a confirm box" button which actually caused thisconfirm box appear..
    2] It recorded the same command twice when only 1 confirm box was there ..

    I tried it for prompts also.. I am facing same problem there..
    However for alerts, It's working fine..

    Thanks..
  • VenkyVenky Members
    edited November 2009
    Yes, there seems to be some problem. It is not adding _click(_button("Show a confirm box")) as you had mentioned. We are trying to figure out what is going wrong here. Will update you once we resolve this

    How quick you need this fix?
  • Hi Venky,

    Thanks a lot for looking into the matter..

    Actually we are trying to test one application for a client using sahi..But for that we need to be sure whether all functionalities are supported by sahi or not ..

    So .. when you people fix that problem please let me know.. Thanks alot..
    (it works fine when I tried for
    http://www.pms.ifi.lmu.de/mitarbeiter/ohlbach/multimedia/JAVASCRIPT/javascript2.html
    )
    please let me know about progress in this matter!
  • VenkyVenky Members
    edited November 2009
    Yes sure, We will keep you posted regarding this

    But i think so, it is adding the script twice when we use frames in our page. If its a single page without any frames it is working fine.

    Hint: Every time clear the stored data in the browser before you playback the script after recording the events which includes prompt,alert & confirm box .

    Thanks for catching bug on this.


    Thanks,
    Venky.
  • hey hi,
    ya you are right..

    It works well w/o frames.. but in frames gives problem..

    And.. my application under test has many pages with frames..

    please update me in this regard..
    Thanks for the efforts you re putting..
Sign In or Register to comment.