opened
uchagani
username_0
For some reason, I am unable to get the handle of the window I would like to interact with.

my code:  

Application _app = Application.Launch(@"C:\Program Files\xxxxx\Client\xxxxx.exe");

// var windows = _app.GetWindows();

Window _window = _app.GetWindow(SearchCriteria.ByText("xxxxxxxx xxxx xxxxx"), InitializeOption.NoCache);

The application launches successfully but the GetWindow fails.  When calling GetWindows to see if any windows are returned, the count is zero.  What am I doing wrong?
Application.GetWindows() returns nothing
issue
created
behzadnaz
username_1
Hi,
I am new to work with this framework. When I run the framework I get below Error in the first few lines:

"An unhandled exception of type 'White.Core.UIItems.UIActionException' occurred in TestWhiteCalculator.exe
Additional information: Couldn't find window with SearchCriteria Name=Calculator in process 8260, after waiting for 5000 ms"

I changed the app.config file  to :

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>

    <sectionGroup name="White">
      <section name="Core" type="System.Configuration.NameValueSectionHandler"/>
    </sectionGroup>
  </configSections>

  <White>
    <Core>
      <add key="WorkSessionLocation" value="." />
      <add key="PopupTimeout" value="5000" />
      <add key="SuggestionListTimeout" value="10000" />
      <add key="BusyTimeout" value="10000" />
      <add key="WaitBasedOnHourGlass" value="true" />
      <add key="UIAutomationZeroWindowBugTimeout" value="10000" />
      <add key="TooltipWaitTime" value="10000" />
      <add key="DragStepCount" value="4" />
    </Core>
  </White>
</configuration>

but still I got the same error in the initial lines. My code started as below:

 " private const string ExeSourceFile = @"C:\Windows\system32\calc.exe";
  private static White.Core.Application _application;
  private static White.Core.UIItems.WindowItems.Window _mainWindow;
  var psi = new ProcessStartInfo(ExeSourceFile);               
  _application = White.Core.Application.AttachOrLaunch(psi);
 _mainWindow = _application.GetWindow(SearchCriteria.ByText("Calculator"), InitializeOption.NoCache);"
                "
I tried to solve this issue by CoreAppXmlConfiguration.Instance.BusyTimeout but
BusyTimeout function has not found.

Do you have any clue what is the reason?
I suspect it is the time out issue but I don't know how can I increase the time out.
Why the framework is very slow.
I will appreciate if anyone can help me

Thanks a lot
comment