If statement with multiple conditions - 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: If statement with multiple conditions (/Thread-If-statement-with-multiple-conditions) |
If statement with multiple conditions - mv8167 - 08-16-2011 I need to check multiple of objects to determine which type of Preference dialog box was displayed. Can I use: Code: With Browser("Fax Request").Page("Preferences") Code: If (.WebElement("WebTable").Exist and .WebEdit("StartDate").Exist and .WebElement("mm/dd/yyyy").Exist and .WebCheckBox("CheckboxSave").Exist Then RE: If statement with multiple conditions - saranya Rangarajan - 08-19-2011 Hai Lorena, If Possible please try this.... Code: If Browser("Fax Request").Page("Preferences").WebElement("WebTable").Exist then Makes sense? Reply me if you have another logic. Thanks, Saranya RE: If statement with multiple conditions - mv8167 - 08-19-2011 I will try your idea. Thx! I had thought about t6his but I was worried it would become a big mess. But my current way takes a long time for each multiple exist. Almost a minute per If statement. This is wayb to slow. I need the Prefrence page to be checked much faster. I will let you nknow how it goes. Lor RE: If statement with multiple conditions - mv8167 - 08-19-2011 I tried your suggestion, but it is still as slow as before. Maybe I will try using Exist(0)? RE: If statement with multiple conditions - Arul - 08-20-2011 Lorena, Try This Code: Dim oDialog:set oDialog=Dialog("text:=Login") Thanks, Arul.D |