Micro Focus QTP (UFT) Forums
warning when using waitProperty - 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: warning when using waitProperty (/Thread-warning-when-using-waitProperty)



warning when using waitProperty - pipsonian - 03-19-2009

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


RE: warning when using waitProperty - farhanalam - 03-19-2009

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



RE: warning when using waitProperty - farhanalam - 03-20-2009

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



RE: warning when using waitProperty - pipsonian - 03-20-2009

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



RE: warning when using waitProperty - farhanalam - 03-20-2009

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