Forum Discussion
Hi ,
I have noticed that WaitWindow method is working fine after including Connect.RunTest at the beginning of my code.
public void Test3()
{
Connect.RunTest("DummyLogName", "Project Name", "Path of TC project suite .pjs file");
Console.WriteLine(DateTime.Now.ToString() + " :: Test started");
var TestObject;
string WndClass = "*";
string WndCaption = "Unavailable Window";
int WaitTimeInMilliSeconds = 40000;
TestObject = Sys["Process"]("IceDesktop")["WaitWindow"](WndClass, WndCaption, -1, WaitTimeInMilliSeconds);
if (TestObject["Exists"])
{
Console.WriteLine(DateTime.Now.ToString() + " :: Window found");
}
else
{
Console.WriteLine(DateTime.Now.ToString() + " :: Window not found");
}
Connect.StopTest()
}
This basically launches TestComplete in "Running-mode" and the WaitWindow method waits for the window for 40 seconds.
I am not sure why this 'WaitWindow' method is not working when RunTest method is not included in my code!!
After reading some online material I understand that we should include this 'RunTest' method in "Connected" applications.
But how is it going to work in 'SelfTesting' applications?? I donot want to link my code in visual studio with any .pjs files.
Is it possible??
Please suggest how to proceed.
Thanks,
Bharat
Related Content
- 3 years agoIuliaVascan
- 3 years agomsalvador
- 2 years agoletoged
Recent Discussions
- 14 minutes agomarkos