Do i put the IF...then & Else statement in the wrong location?
hi there,
i have issue trying to have my If...Then and Else statement to work with my object in my keyword test project.
Scenario:
As you can see from the image- i have an If...Then...Else... statement.. there are two scenarios i am applying to my test.
First, when opening an old database and IF the Database Upgrade object is Visible (true) THEN go on and update the database - this working as expected (ELSE didnt get touched)
Secondly, i am repeating the same test, but this time with an already upgraded database. because the databaseUpgrade object shouldn't appear I'd expect to have the keyword-test to skip the pre-determined test and go straight into ELSE statement...but this is not the case.
Do i put the IF...then & Else statement in the wrong location??
or am I doing this in the very bad/wrong way?
your advise is appreciated.
Regards,
You're still checking the Visible property of an object that doesn't exist which is the cause of the error.
In you if statement change Aliases.IC.databaseUpgrade.Visible to Aliases.IC.databaseUpgrade.Exists it should fix.