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.

Not able to properly launch url(before navigation url) each time for large suits of testcases in IE

karthikaithalkarthikaithal Members
edited March 2013 in Sahi - Open Source
Hi all/Narayan,

Can any one please give some resolution to below problem?

Normally automated test runs fine with small set of test cases using sahi. But with large number of cases which open and close browser many time, creates issue with launch(which contains session id and other details) making pages to go offline and my test case just fails because of no navigation to url I mentioned in test. If I manually click refresh button(when it goes offline) then I can continue to navigate to url provided in test. To fix this issue I come up with below resolution which improved our executing, but the core issue still exist.

Resolution I followed:

1. As I am having one dedicated server to run automated cases, I switch proxy setting permanently to 9999 port and changed browser setting - as <useSystemProxy>false</useSystemProxy>. By this, we won't enable or disable proxy on each browser open and close.

2. Wrote "Deletecookies" method to clear all the cookies before browser open to create session id properly for each browser.open

Even after doing this, I still see launch page go offline(for 1 in 30 or more test execution).

Can I directly launch to "http://sahi.example.com/_s_/dyn/Driver_initialized"; url without appending any "session id" and other details as I don't need to check proxy setting every time?

some more thoughts:

1. Can I use below command:

execCommand("launchAndPlayback", qs);

in browser.open for automated(passes browser variable) cases too?

What is main difference between "launchAndPlayback" and "launchPreconfiguredBrowser" parameter? Does "launchAndPlayback" don't have seesion id?

It would be very helpful if some one help to resolve this issue.

Thanks,
Karthik

Answers

  • thavvathavva Members
    Karthik,

    Did you get answer for this? I'm also facing this kind of challenge when i test case fails and browse get closed without logout for next test case it seems sahi not clearing session hence it directly open last logged in use session?

    My questions:

    1. How clear cookies with sahi on completion (either error) of test case?
    2. How to open a new browser from script? do we have any command to open a browser from sahi like browser.open() which we use for java client?
Sign In or Register to comment.