shawn2005
10 years agoNew Member
Sometimes the code throw Unable to find VBObject error.
My code is:
function AllTechsRadioButtonIsClicked()
{
if (WebPMAppPage.browser.VBObject("frmSelect").Exists && WebPMAppPage.browser.VBObject("frmSelect").WndCaption == "Data Selection")
{
var frmSelect = WebPMAppPage.browser.VBObject("frmSelect");
if (!frmSelect.Focused)
frmSelect.SetFocus();
// Technicians Tab
frmSelect.VBObject("SelectTabs").ClickTab("Technicians");
frmSelect.VBObject("SelectFrame_2").VBObject("Frame1").VBObject("optTechs").ClickButton();
}
}
Sometimes the code will failed at the if condition,
But actually the frmSelect is already displayed and it is not stuck.
Any body know how to avoid Can't find VBObject issue?
Thanks