Script failue as test compete searching for an object in the if statement and didn't find it
function Unit12()
{
if(Aliases.Device.Process_ionicframework_newpnm295021.RootLayout.WebView_orgapachecordovaengineSystem.HomePage.CustomerAccount.CustomerAccountSearch.CustomerAccountSearch.SearchBYIPV4.SearchBYIPV4.VisibleOnScreen)
{
Log.Message(aa)
}
else
{
KeywordTests.TS01_BackButton.Run();
}
}
Can anyone help me to understand - Why my above code is searching the object in the if statement?
during playback I am getting message waiting for the object..Preparing an object recognition hint..
Yo!
In belowe code example You have twice:
a) "Aliases.Device.Process_ionicframework_newpnm295021.RootLayout.WebView_orgapachecordovaengineSystem.HomePage.CustomerAccount.CustomerAccountSearch.CustomerAccountSearch.SearchBYIPV4.SearchBYIPV4.VisibleOnScreen"
Is this right?
b) "Log.Message(aa)" -> use " " inside "aa"
1) Try to check you NameMapping repository for correct object values "CustomerAccountSearch". do You have it in repository?
2) Do not use "VisibleOnScreen" if you want to check to exist of an object. Use .Exists instead.