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.

Take values from another webpage while running scripts

akshaymgsakshaymgs Members
edited November -1 in Sahi - Open Source
I want to fetch the data from another webpage to the currently running script on different webpage.

For Ex:-
1. I've created a script for "abc.com"
2. I entered the data in the fields then submitted.
3. It takes me to the next page.
4. Now on that page I need to enter the values in some fields which were generated mean while on the "xyz.com".

So I want have those values in between into my script without navigating to that page.

Please Advice.

Akshay Garg.

Comments

  • Hi akshaymgs,

    You will have to navigate to xyz.com and store the values in a file. Now you can read this file using _readFile() API.

    Regards
    Sumitra
  • Is there anyway that the value could be picked up in the back-end without interrupting the original site, i.e. navigation is done in the another tab.
  • Hi Akshay,

    I think this code might be useful.
    _navigateTo("http://sahi.co.in/demo");
    _click(_link("Link Test"));
    _click(_link("Back"));
    _call(window.open("http://www.w3schools.com", "calcWindow"));
    _selectWindow("calcWindow"); //select popup window
    _click(_link("Learn XML")); //perform actions in popup window
    _closeWindow();
    _selectWindow(); //select base window
    

    You could store the values from the popup window in variables and fetch them later in the main script.

    Regards,
    Sumitra
  • Thanks Sumitra.
    Now its working..
This discussion has been closed.