Oferv
14 years agoSuper Contributor
WaitProperty stop the script instead of moving on to Else
Hi,
can anyone explain me pls why the bold line, in case it's False, stop my script from running instead of moving on to the else statement?
if(Aliases["FusionDesktop"]["HwndSource_MainWindow"]["MainWindow"]["Grid"]["TabControl"]["Grid"]["WPFObject"]("ContentPanel")["WPFObject"]("PART_SelectedContentHost")["WPFObject"]("AssemblyViewTabControl")["WPFObject"]("Grid", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("UserControl")["WPFObject"]("UserControl")["WPFObject"]("TabItem", "", NumberOfTabs)["WPFObject"]("UserControl")["WPFObject"]("StackPanel", "", 1)["WaitWPFObject"]("TextBlock", FileWithoutExt, 10000)["Exists"])
{
Log["Message"]("File " + "'" + File + "'" + " opened properly,New tab was created for it")
//Stop the time counter
TimeToolDocumentFullyLoad.Stop();
// Posts the elapsed time to the test log
Log.Message("The time took the document to load is : " + TimeToolDocumentFullyLoad.ToString());
}
else
{
Log["Warning"]("File " + "'" + File + "'" + " wasn't open properly,No tab created")
}
Thanks
can anyone explain me pls why the bold line, in case it's False, stop my script from running instead of moving on to the else statement?
if(Aliases["FusionDesktop"]["HwndSource_MainWindow"]["MainWindow"]["Grid"]["TabControl"]["Grid"]["WPFObject"]("ContentPanel")["WPFObject"]("PART_SelectedContentHost")["WPFObject"]("AssemblyViewTabControl")["WPFObject"]("Grid", "", 1)["WPFObject"]("Grid", "", 1)["WPFObject"]("UserControl")["WPFObject"]("UserControl")["WPFObject"]("TabItem", "", NumberOfTabs)["WPFObject"]("UserControl")["WPFObject"]("StackPanel", "", 1)["WaitWPFObject"]("TextBlock", FileWithoutExt, 10000)["Exists"])
{
Log["Message"]("File " + "'" + File + "'" + " opened properly,New tab was created for it")
//Stop the time counter
TimeToolDocumentFullyLoad.Stop();
// Posts the elapsed time to the test log
Log.Message("The time took the document to load is : " + TimeToolDocumentFullyLoad.ToString());
}
else
{
Log["Warning"]("File " + "'" + File + "'" + " wasn't open properly,No tab created")
}
Thanks