Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
warning when using waitProperty
#1
Solved: 11 Years, 4 Months ago
Guys, i am new to QTP. i am trying to execute the following script but its throwing me a warning message.

Code:
Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebButton("Sign In").Click
Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebEdit("login").WaitProperty "text", "Inbox", 30000
Browser("Yahoo! Mail: The best").Page("(0 unread) Yahoo! Mail,").WebElement("Sign Out").Click

Please let me know (in detail if possible) what is wrong with this script.

Also, where can i look at the detailed error messages/warnings? Does QTP generate any kind of log files where i can look for the details.

Appreciate your help in advance.

Thanks
Reply
#2
Solved: 11 Years, 4 Months ago
Hi,

You used "Text" as a property name however WebEdit does not have any such property.

The syntax for the waitProperty is:
Code:
object.WaitProperty (PropertyName, PropertyValue, [TimeOut])
An Example:
Code:
If Browser("index").Page("index").WebEdit("Account").WaitProperty("disabled", 0) Then
    Browser("index").Page("index").WebEdit("Account").Set ("123")
End If
Reply
#3
Solved: 11 Years, 4 Months ago
Use "value" instead of "text"

Code:
Browser("Guidewire PolicyCenter").Page("Guidewire PolicyCenter").Frame("Login Frame").WebEdit("username").Set "myinbox"
Browser("Guidewire PolicyCenter").Page("Guidewire PolicyCenter").Frame("Login Frame").WebEdit("username").WaitProperty "value", "myinbox", 3000
Reply
#4
Solved: 11 Years, 4 Months ago
Tried doing that too but still i get a warning message. But when i insert a checkpoint and run the step as stand alone i dont get a warning message.

Code:
Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebButton("Sign In").Click
Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebEdit("login").WaitProperty "Value", "Inbox", 3000
Browser("Yahoo! Mail: The best").Page("(0 unread) Yahoo! Mail,").WebElement("Sign Out").Click
Reply
#5
Solved: 11 Years, 4 Months ago
By the way, what error message you are getting?

Try put wait(20) before WaitProperty Line and see if it helps.
Code:
wait(20)
Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebEdit("login").WaitProperty "Value", "Inbox", 3000

If it does help it means object was not available, try to enclose WaitProperty with IF-END use Exist method:

Code:
If Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebEdit("login").Exist 30000
    Browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebEdit("login").WaitProperty "Value", "Inbox", 3000
End If

If Brow
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help for instruction to click on Skip button in the warning message vijilesh 0 1,516 09-16-2018, 03:48 PM
Last Post: vijilesh
  Help Waitproperty or Checkproperty with micGreaterThan() Code typhoon23 1 1,990 08-23-2017, 05:02 PM
Last Post: Ankur
  WaitProperty does not refresh the object (WebNumber) cantorre 0 1,582 05-10-2017, 06:21 AM
Last Post: cantorre
  [UFT] WpfTable and WaitProperty with RowCount robertosalemi 0 1,971 11-23-2016, 10:55 PM
Last Post: robertosalemi
  Synchronization using waitproperty Nisha 1 2,332 10-29-2016, 09:20 AM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 2 Guest(s)