Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Condition if used to check set values in text box(simple one here)
#2
Solved: 11 Years, 4 Months ago
Hi Swapna,
You want to check that whether the text box is null or if it has numerics.
Now, if you want to check it afterwards then it means after entering the values in the text box.Then, you can do so after taking the output values in a variable and then checking whether it is NULL or numeric
BUT if you want to check before entering any value in the text box like a validation that it should not allow blank or numeric.Then you can do that by getting the ROProperty of any property's value and matching it with the required data.
Here,you give the right choice for which the text box should accept the value and rest all cases will fail.I mean you cannot bifurcate the invalid cases,you just have one right and rest wrong.
Example-
Suppose I want username to be "Deepak" and I entered "abc" as username.So,this is how you can check:

Code:
Browser("orkut - login").Page("orkut - login").WebEdit("Email").Set "abc"
username=Browser("orkut - login").Page("orkut - login").WebEdit("Email").GetROProperty("value")'
If username="deepak" Then
   Reporter.ReportEvent  micPass, "username" ,  "pass"
  
  Browser("orkut - login").Page("orkut - login").WebEdit("Passwd").SetSecure "34723fh445346hgjhghfgh35dghdhjfhfk"

  Browser("orkut - login").Page("orkut - login").WebButton("Sign in").Click
  
  else
  
   Reporter.ReportEvent  micFail, "username" , "fail"
  exittest()
End If
Reply


Messages In This Thread
RE: Condition if used to check set values in text box(simple one here) - by deepakmehta82 - 02-27-2008, 06:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can we get the Windows application Text box background color Using UFT 11.53 Kuppampattu 3 6,032 06-06-2017, 11:12 AM
Last Post: workrohit08
  Not able to set value in application web edit box tanuj dewangan 4 3,701 07-29-2016, 03:58 PM
Last Post: harshadevadas
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,916 05-04-2016, 11:28 PM
Last Post: supputuri
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 4,907 09-13-2015, 12:06 AM
Last Post: ADITI1992
  Check Box Object Identification rakesh499 0 2,119 01-27-2015, 01:56 PM
Last Post: rakesh499

Forum Jump:


Users browsing this thread: 1 Guest(s)