How to customize a portion of your test case based on browser type?

You can get the type of browser running your test using @system.browser and then you can use it in a conditional statement to act differently as follows:

IF HALT TEXT "@system.browser" = "FIRE_FOX"
PRINT "Firefox"

CALL  firefox_function
ELSEIF HALT TEXT "@system.browser" = "CHROME"
PRINT "Chrome"

CALL chrome_function
ELSEIF HALT TEXT "@system.browser" = "IE"
PRINT "IE"

CALL ie_function
ELSE HALT
PRINT "None"

CALL other_function
ENDIF HALT

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.