Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WaitProperty or checkproperty
#1
Solved: 11 Years, 4 Months ago
Hi

I am a newbie here with QTP but would like to ask a question about checking text on a pop-up. The text says "MESSAGE: :File was successfully uploaded "

Also object spy says: <multi-line value>

Code:
Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").WaitProperty "text", "MESSAGE: File was successfully uploaded "

the is a space after the "uploaded"


OR

Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").CheckProperty "text", "MESSAGE: File was successfully uploaded "


Also

In the object repository the text property is set to:

MESSAGE: File was successfully uploaded

(guess there was a new line character there) so I set it (in the Object properties) to:

MESSAGE: File was successfully uploaded.*

and regular expression is ticked.

If I click locate in application it finds the text, except that when I run the code it doesn't seem to work.

Any pointers in where I am going wrong?
Reply
#2
Solved: 11 Years, 4 Months ago
i think the problem is the new line character on the pop-up. i cant change this infortunately. if i set a watch on the text propert I SEE the little square character that normally denotes a newline.

Any ideas on how you check say the first 10 characters on the pop-up and no more? Instead of the whole string.
Reply
#3
Solved: 11 Years, 4 Months ago
Hi, have you tried this
Code:
Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").CheckProperty "text", "MESSAGE: File was successfully.*"
Reply
#4
Solved: 11 Years, 4 Months ago
Hi there, thanks for taking the time to respond. It does not work. The object repository, the text property: Do I need to update this property to be:
MESSAGE: File was successfully.*

also?

I will have to revisit my QTP notes as this little issue is driving me crazy
Reply
#5
Solved: 11 Years, 4 Months ago
yes, update that in OR also and try.
Reply
#6
Solved: 11 Years, 4 Months ago
also I tried:

Code:
Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").CheckProperty "text", "/MESSAGE\: File was successfully\/n/"

Doesnt work Sad

The error message says: Propert text is empty...
Seems to work with the following:

Code:
Browser("_Maintenance").Dialog("Microsoft Internet Explorer").Static("MESSAGE: File was successfully").WaitProperty "text", "MESSAGE: File was successfully uploaded" & vbNewLine & "", 1

This i need to brush up on this
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Click after CheckProperty to a WebElement passed via Function argument fails naruoga 0 1,160 02-28-2019, 11:46 AM
Last Post: naruoga
  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,973 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)