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.

Issue with Java Code unit testcase execution for browser popup.

cmblcmbl Members
edited March 2010 in Sahi - Open Source
Hi Team,

I am using Sahi unit test case using java. Similar to the sample java project you have provided.

When i give navigateTo as in the below code
browser.navigateTo("http://localhost:9080/appName";);

I get a browser popUp as a security warning. This doesn't appear when i directly type the website name in the browser, only appears when i do navigateTo("...");

So i wrote the below code to get the popup object with the title "Security Warning" and click on button "Yes".
Browser popupWithTitle = browser.popup("Security Warning");
popupWithTitle.button("Yes").click();

But this doesn't simulate. I need to give a manual input.

How do i resolve this issue?

I am not able to attach a screen shot here. This would really help you in better understanding of the problem.


The complete code is as below.

browser.navigateTo("http://10.20.249.145:9080/lightspeed";);
Browser popupWithTitle = browser.popup("Security Warning");
popupWithTitle.button("Yes").click();

popupWithTitle = browser.popup("Certificate Error: Navigation Blocked");
popupWithTitle.link("Continue to this website (not recommended).").click();


Regards,
Chandra

Comments

  • cmblcmbl Members
    Any updates?
  • narayannarayan Administrators
    Hi Chandra,

    Again, could you send a screen shot to support@sahi.co.in?

    Regards,
    Narayan
  • cmblcmbl Members
    Sent screenshots to the given email id.

    Thanks & Regards,
    Chandra
Sign In or Register to comment.