Ask a Question

While Loop using Local Variable

SOLVED
TiSiLud
New Contributor

While Loop using Local Variable

Hi guys,

 

I've been lurking here getting help for a few weeks now, there seems to be a solution for everything apart from the issue I've got now, I was wondering if someone could help.

 

I am testing a .NET application, and I need a test which will:

Pull a Permit Number from a field and store it as a local variable (which I've done)

Compare this Permit number against a table in another window, to make sure the permit number is present (which proves the permit is raised).

All of the permit numbers are stored in Column 0 of the table, but I have no idea how to program it to iterate through the rest of the column if the permit isnt in row 1.

 

I've been playing with this for about 4 hours now and I think I cant see the trees for the forest!

 

Conveniently I'm not super skilled with Python (or any other language for that matter) - so I've been trying to create this with a keyword test.

 

The best I've come up with is a While loop which works like:

 

While the Permit Number

 

Does not equal

 

(row 0 in the permits column) 

 

That is it, I just don't know where to go from here.

 

Any help would be greatly appreciated, I'm new to this and feel silly asking what are probably very rudimentary questions.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Marsha_R
Community Hero

Re: While Loop using Local Variable

Take a look here:

https://support.smartbear.com/testcomplete/docs/keyword-testing/basic/data-driven-loops.html

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

View solution in original post

3 REPLIES 3
Marsha_R
Community Hero

Re: While Loop using Local Variable

Take a look here:

https://support.smartbear.com/testcomplete/docs/keyword-testing/basic/data-driven-loops.html

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

View solution in original post

sonya_m
Community Manager

Re: While Loop using Local Variable

Thank you Marsha!

 

@TiSiLud did the suggestion help?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
TiSiLud
New Contributor

Re: While Loop using Local Variable

Thank you so much, this has made my life so much easier

cancel
Showing results for 
Search instead for 
Did you mean: