Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compare strings and perform action
#5
Solved: 10 Years, 9 Months, 2 Weeks ago
Hi gump,
here in your case we are taking values from data table and performing actions according to the condition, what the answer given by ankesh is correct, in order to save time you could use select statement.

example
Code:
a=datatable("A", dtGlobalSheet)
Select Case a
Case "ABC"
Dialog("Login").Activate
Dialog("Login").WinEdit("Agent Name:").Set "ABC"
Dialog("Login").WinButton("Cancel").Click
Case "DEF"
Dialog("Login").Activate
Dialog("Login").WinEdit("Password:").SetSecure "4e6224718ae0eaf92a4e26655f509650a67f9999"
Dialog("Login").WinButton("Cancel").Click
Case else
next action
End Select
Reply


Messages In This Thread
RE: compare strings and perform action - by Rohan - 09-06-2011, 11:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Compare WebTable Elements saraiado 1 2,457 06-11-2015, 06:54 PM
Last Post: venkatesh9032
  How to compare two binary values Naresh 0 2,188 09-09-2014, 05:06 PM
Last Post: Naresh
  Same command needs to be performed twice to actually perform it pistaa 2 2,651 04-25-2014, 01:26 PM
Last Post: pistaa
  Perform some functions whenever QTP Stop button is pressed smartkarthi 2 2,959 08-22-2013, 11:43 AM
Last Post: smartkarthi
  how to compare excel with datatatble diya 4 5,252 12-04-2012, 05:39 AM
Last Post: diya

Forum Jump:


Users browsing this thread: 1 Guest(s)