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.

Existing Browser

Azhaguvel.AAzhaguvel.A Members
edited November -1 in Sahi - Open Source
Hi All,

Can anyone tell me to solve this ?

Issue : I don't want open browser through sahi. It's already open that particular browser, just
I want trigger some API from sahi to existing browser.

Is this possible to access already existing browser through sahi?

Comments

  • Hi Azhaguvel.A,

    Yes, it is possible.

    You will have to start sahi's server and set the browser to use Sahi's proxy.

    For setting the browser to use Sahi's Proxy, follow this link:

    http://sahi.co.in/w/configure-browser-proxy

    Now you will be able to trigger the API's.

    Regards
    Sumitra
  • Hi Sumi,

    I was asking in java sahi code, Without opening browser session, How can I communicate an existing browser with sahi code. I have attached sample java sahi code and give an idea,How to solve this?

    browser = new Browser("ie");
    browser.open(); // Browser Session

    testGoogle()
    {
    browser.navigateTo("http://www.google.com";);
    browser.textbox("q").setValue("sahi forums");
    browser.submit("Google Search").click();
    }

    Thanks & Regards,
    Azhaguvel.A
  • Hi Azhaguvel.A,

    It is not possible to communicate with an existing browser with sahi code from the way you have mentioned.

    You can start Sahi's server >> open the browser (not through Sahi) >> set the proxy to this browser >> Open the controller by Alt+Double click on the page.

    Now you can trigger the APIs.

    Regards
    Sumitra
  • narayannarayan Administrators
    Hi Azhaguvel,

    Sahi cannot control a browser window unless the browser has been opened by Sahi itself.

    Regards,
    Narayan
Sign In or Register to comment.