Ask a Question

Facing issue with while working strings which if statement

SOLVED
SunilKumarR
New Contributor

Facing issue with while working strings which if statement

problem question: KeywordTest

1) does if statement works with strings?

2) while running a data-driven test, how to skip one of the iteration ?

3) how to read empty excel cell?

 

Please try to explain the above question?

1 REPLY 1
Marsha_R
Community Hero

1)Yes, you can have an if statement with strings, like 

if myteststring = 'abc' then

 

2)To skip an iteration, you would have to keep track of the iteration number and check for it each time

if myiteration <> 10

   do some stuff

else 

   don't do anything

 

3) I have never had luck reading an empty excel cell. We ended up putting a character in the field that didn't mean anything and using that as if it was empty.

 

if myexcelcolumn <> ')" then

    do some stuff

else 

    don't do anything


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
cancel
Showing results for 
Search instead for 
Did you mean: