Skip to Content
Former Member
Apr 23, 2014 at 10:06 PM

SAP Personas - Use of variable in IF statement


Hope someone can assist with this script

I am storing a value from a dropdown box in a variable so this can be used latter when I am in a different screen within same script.

But the problem I am facing is if i perform a if statment against a variable , it does not work

What I do in test script

1) copy value from drop down into varable

2) paste value to textbox to test value

3) if check is equal for value (N506) in variable "site"

4) if true, put "tested ok" in text box.

if perofrm the test on the dropdown box directly... it works

if perform the test on the textbox i copied variable to... it works.

if perform test on variable fails...

Doing the test in the first two cases, will not work , as the textbox and dropdown box will not be on screen , when i need to perofm the if statement.

I am suspecting the if statement is interpurting the word site, as a text rather then a varaible name, so how can read a variable and use it in a if statement, without using a box on the screen itself.

Any help is appreciated.


Capture.GIF (38.4 kB)