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.

TestRunner not working for https site

vinu32vinu32 Members
edited November -1 in Sahi - Open Source
Hi -

OS Name - windows 7
Browser Name - IE 8
Sahi build - 3.5

Hi -

I am facing a problem while calling a https url through TestRunner. Below are the details.

---- this is how i invoke TestRunner --
D:\SAHI\userdata\bin>java -cp d:\SAHI\lib\ant-sahi.jar net.sf.sahi.test.TestRunn
er -test D:\SAHI\userdata\scripts\adtest.suite -browserType ie -baseURL <https link > -threads 1


--- this is the script i want to get executed --
_setValue(_textbox("username"), $Chief_UserName);
_setValue(_password("password"), $Chief_Password);
_click(_submit("Login"));
_click(_div("Manage Cases"));

---- Error in the logs ---
ERROR
Script did not start within 150 seconds. at Nov 15, 2011 11:29:05 AM


The url is opened but none of the commands inside the sah file gets executed. When i run the

same script from the proxy it works fine. Changing the url from https to http above works

fine. I am starting to wonder if this has anything to do with the self signed certificate

that the SAHI proxy pumps in each time it runs a https site.


Thanks
Vinod

Comments

  • Hi Vinod,

    Yes, you need to accept SSL certificate for IE8.

    Kindly follow the below URL:

    http://www.youtube.com/watch?v=qfjjVUGW56s

    Let me know if you face any problem.

    Regards
    Sumitra
  • Hi Sumitra -

    I have accepted all the certificates and the script works fine from the SAHI controller but when i try to run the same script using TestRunner it does not work. Is there any other setting i need to make in SAHI to make my scripts work using TestRunner ( both java and bat file )

    thanks
    Vinod
  • Hi Sumitra -

    ---- This is the output on the controller console --
    >>>>>> Tests size = 1
    #### Running Script: D:\SAHI\userdata\scripts\CHIEF_CreateCaseForRTRSvcs.sah
    Nov 15, 2011 11:26:33 AM net.sf.sahi.test.ProcessHelper execute
    INFO: "C:\Program Files\Internet Explorer\iexplore.exe" "http://sahi.example.co
    m/_s_/dyn/Player_auto?startUrl=https%3A%2F%2Fabc.com%
    2Fmember%2Flogin.php__SahiAmpersandSahi__sahisid=sahi_1efefe7707c04046c90ad930c0
    e10fbac1a4sahix74391ba0010850429e0892c0e90e6a4ba036x__SahiAmpersandSahi__isSingl
    eSession=false"
    Nov 15, 2011 11:26:34 AM net.sf.sahi.test.ProcessHelper$PIDGatherer run
    INFO: PIDs: [5540, 4336]; 810 ms
    Killing D:\SAHI\userdata\scripts\CHIEF_CreateCaseForRTRSvcs.sah
    Nov 15, 2011 11:29:06 AM net.sf.sahi.test.ProcessHelper kill
    INFO: Kill: [5540, 4336]
  • Hi Vinod,

    Kindly follow the steps:

    Start Sahi>> Launch IE8 browser >> navigate to your https site >> check if the application is opened properly(i.e if the elements on the page are displayed properly), if not then kindly send me the screen after you navigate to https site.

    Also, if the application is opened properly then Ctrl+Hover on the elements and check if Sahi is able to identify the elements.

    Regards
    Sumitra
  • hi Sumitra -

    I followed all these steps earlier while running the script through the SAHI controller and it worked fine. All the elements on the page are displayed properly.
    Ctrl+hover works fine when i open the https site through controller and TestRunner.bat. I am able to capture the elements as well.

    The only problem i am having right now is to run the script through the TestRunner which will help me automate through Ant instead of calling the scripts through the controller.

    Your help is highly appreciated
    Thanks
    Vinod
  • Hi Vinod,

    Use the following format of testrunner.bat and check if it works fine.

    testrunner.bat demo/demo.suite http://sahi.co.in/demo/ firefox
    testrunner.bat demo/sahi_demo.sah http://sahi.co.in/demo/ ie
    testrunner.bat demo/tagged_suite.csv http://sahi.co.in/demo/ ie "'tag one',tag2"

    Regards
    Sumitra
  • narayannarayan Administrators
    Hi Vinod,

    When running the script from the Controller, do you accept the certificate every time you open a fresh IE instance? It is possible that the certificate has not been accepted properly, because of which the playback stops during unassisted runs.

    Regards,
    Narayan
  • Hi Narayan -

    While running the script from the controller i install the cert into the Trusted Key store once and that is it. The certificates are accepted properly. While doing this i also included the site in the Trusted Sites in IE8.
    Now for these scripts to run from TestRunner i need to remove them from the Trusted Sites. Now my problem is resolved and i am able to run the script from the Controller and TestRunner.
    Thanks for all your help. Thanks Sumitra.

    Now i am facing a different issue with the batch process. I will post separately on this. Please close this post.

    Thanks
    Vinod
This discussion has been closed.