I am having trouble getting a conditional statement to work, here is my objective.
I am having my script go through our web portal to make several purchases on an account. Sometimes I will get a confirmation that the CC transaction went through successfully, other times it will go to a "try again" or "cancel" page.
If the card number was successfully charged, a "log in" html button will exist, otherwise a "cancel" or "Try again" button will exist.
Here is what I tried with no luck
if HTMLButton("Caption='Log In'").exists = true then
Thanks in advance, (not yet an expert in VB obviously! [img]/images/graemlins/wink.gif[/img]
I am by no mean an expert at VB either...but I would try this logic and see if it would make any different:
set logInBtn = HTMLButton("Caption='Log In'")
set cancelBtn = HTMLButton("Caption='Cancel'")
set cancelBtn = HTMLButton("Caption='Try Again'")
In some case, exist will be true for all cases (even if the button is not showing on the screen (but it exist). So if there is any other property of the button, I will use that instead (i.e. IsVisible, or visibleOnScreen)
If cancelBtn.IsVisible then
elseif tryAgainBtn.IsVisible then