Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot find the "WebEdit" object's parent "Page" (class Page)
#1
Solved: 11 Years, 4 Months, 4 Weeks ago
Hi everyone,

I'm a newbie in QTP. I have just learn it, and I try to automate a requirement like this "Open google page,fill in data search then search".
I write code like these:

Code:
Dim obj_Browser
Dim obj_Page
Dim obj_Text
Dim obj_Search
Set obj_Browser = Description.Create
Set obj_Text = Description.Create
Set obj_Search = Description.Create
Set obj_Page = Description.Create

obj_Browser("name").value = "Google"
obj_Text("name").value = "q"
obj_Text("html tag").value = "INPUT"
obj_Page("name").value="Google"


obj_Search("type").Value = "Submit"
obj_Search("html tag").Value = "INPUT"
obj_Page("url").Value = "http://www.google.com"
obj_Browser.navigate "http://www.google.com"

Browser(obj_Browser).Page(obj_Page).WebEdit(obj_Text).Set "test"
Browser(obj_Browser).Page(obj_Page).WebButton(obj_Search).Click
Browser(obj_Browser).Page(obj_Page).Sync

However, when running, it cause error "Cannot find the "WebEdit" object's parent "Page" (class Page). Verify that parent properties match an object currently displayed in your application."

I don't know how to correct it. Pls hekp me, tks a lot.
Reply
#2
Solved: 11 Years, 4 Months, 4 Weeks ago
Since you are a beginner I would suggest you to go through each and every post on QTP Blog. This Q is related to Descriptive Programming(DP),you would find a lot of info there regarding DP.

ok, in the above Q, remove
Code:
obj_Page("url").Value = "http://www.google.com"
and check.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Handler Page Redirects zunebuggy 1 1,323 09-15-2020, 11:01 PM
Last Post: Ankur
  How to export the output value of a webedit object to a new excel file. mounika6677 1 1,573 04-14-2019, 05:18 PM
Last Post: mounika6677
  How to identify an error page occurring in server in between the qtp run. aswini 1 1,806 05-04-2017, 03:52 PM
Last Post: Ankur
  click each web link in a page using Index or other method in QTP smeijer 13 24,806 04-29-2017, 04:53 PM
Last Post: kowshik
  How to get the links which appears on mouse hover of parent link rajendra649 9 35,689 03-10-2017, 06:35 PM
Last Post: satish00k

Forum Jump:


Users browsing this thread: 1 Guest(s)