Micro Focus QTP (UFT) Forums
Conditional Statements - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Conditional Statements (/Thread-Conditional-Statements)



Conditional Statements - golfer999999 - 01-28-2009

Hi,

I have a test setup on a web application which is fine unless the product selected is an "XXZ" product. Then another field appears in the web app (Number of cartons).

This field is only there when someone selects a product with "XXZ" in the name

I can't seem to figure out how to get the If else statement to work so that if "XXZ" is contained in the products list, then enter a value into the "number of cartons" from the action list, if it does not contain "XXZ" then skip this command.

Any help would be gratefully received!!

Cheers

G9


RE: Conditional Statements - kishoreinchennai - 01-28-2009

Code:
WebList("product").GetROProperty("Selection")=XYZ

and

Code:
WebList("Cartons").exsist(0) then .......



RE: Conditional Statements - golfer999999 - 01-29-2009

Hi,

Thats cool thanks - is there any way to say contains XXZ rather than is equal to?