Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I do not understand why my DP is not working. So obvious!
#1
Solved: 10 Years, 8 Months, 3 Weeks ago
This is my DP:

Code:
Browser("name:=Delta - Book a flight").Page("title:=Delta - Book a flight").WebEdit("name:=departureCity[0]", "html id:=departureCity_0").Set "ATL"

This is what is recorded by QTP10:

Code:
Browser("Delta - Book a flight").Page("Delta - Book a flight").WebEdit("departureCity[0]").Set "ATL"

Error msg says "cannot identify the object "[WebEdit]" .... etc See screenshot

See my two attachments.

This is very frustrating! I dont know what I am doing wrong.

Please help.


Attached Files Image(s)
       
Reply
#2
Solved: 10 Years, 8 Months, 3 Weeks ago
Use escape sequence where ever a special character occurs while writing a DP code for your object to be identified properly.So lets correct your code as shown below.
Code:
Browser("name:=Delta - Book a flight").Page("title:=Delta - Book a flight").WebEdit("name:=departureCity\[0\]", "html id:=departureCity_0").Set "ATL"
This will identify and set the value "ALT" in the webedit mentioned.


Regards,
Ravi
Reply
#3
Solved: 10 Years, 8 Months, 3 Weeks ago
Thank you so much Ravi! It work!

I wonder what my next stumbling block is.
Thanks Ravi! It is working now!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help to understand these codes jinnah 2 1,836 09-19-2012, 09:04 PM
Last Post: jinnah

Forum Jump:


Users browsing this thread: 1 Guest(s)