Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

Getting window/Domain not found

nikunjnikunj Members
edited 11:41AM in Sahi - Open Source
Hello

recently i have installed Sahi tool and I do not have much idea about this.

My application is supporting only IE browser.

when i record simple use case like login, click on link and logout, it is working perfectly.
But when i record the single transcation of my application, I found "window/Domain not found" error.

Scenario: The use case is as below.
After login, My application has user serach activity. There is "Search" button near agent code textbox.
Step - 1: When click on "Search" button it will open pop up window. In the popup window, we can search the Agent by name and code.
After seraching by name, i have selected the Agent by clicking on radio button and click on "select" button. the popup is closed and it will appear agent name and code in respective textbox on parent window.

Step - 2: There is sub agent code "search" button available near sub agent code textbox.
When click on "Search" button it will open pop up window. In the popup window, we can search the sub agent by name and code.
After seraching by name, i have selected the sub Agent by clicking on radio button and click on "select" button. the popup is closed and it will appear sub agent name and code in respective textbox on parent window.

Problem:
When i playback the recorded script, the step - 1 executes very well. but the script fails on the step -2 and it is giving below error.

Error in script: _popup("userSearch")._setValue(_textbox("txt_userID"), "test");
Window/Domain not found: popupNameFromStep=userSearch; derivedName=; windowName=; windowTitle=Application Details; wasOpened=0; domain=
--Stopped Playback: FAILURE--

When i check log it is failing on below syntax which is the starting point of step - 2. The popup window of step-2 is not open.
_click(_button("Search[2]"));


Please suggest me the solution.

Comments

  • nikunjnikunj Members
    Hi

    The problem solved. Here is the solution.

    while recording the script, sahi puts controls index number like
    _click(_button("Search[2]"));
    _click(_link(37));
    _click(_button("Search[6]"));

    Instead of this, i used button name like
    _click(_button("btn_agentsearch"));
    _click(_link("mylink"));
    _click(_button("btn_subagentsearch"));

    It works for me.
Sign In or Register to comment.