05-25-2018, 10:51 AM
Hi I have this below code where everything else in the function works fine except for the Select case. The select case is not even being executed. It executes till the if statement and then exists the function. does not throw any error or anything. Can someone tell What am I doing wrong.
Code:
Function Submit_Wirelog(SelectSubmitOrCancel)
Dim funcName : funcName = "Submit"
Dim setupFuncName : setupFuncName = "SETUP|" & funcName
If Browser("Browser").Page("Pge").WebElement("Ele").ExistsAbort (10) Then
Select Case ucase(SelectSubmitOrCancel)
Case "Submit"
Browser("Browser").Page("Pge").WebButton("Btn").ClickAbort (20)
Created =Browser("Browser").Page("Pge").WebElement("LblLogNumber").GetROProperty("innertext")
Case "Cancel"
Select Case ucase(parameter.Item("SubmitYesorNo"))
Case "YES"
msgbox "Cacelled"
Case "NO"
msgbox "NO"
End Select
End Select
else
ResultOutput "Pass", "Expected:Verified and created wireLog"&vbnewline,"Actual:Done Successfully"
End If
End Function