Quality Testing

Quality is delighting customers

Hello Friends....

I have written a descriptive code

QTP will open the contact us from page and just want to write Dhanraj in name input field.

Below is the code but when I run it then QTP throwing error message as :

Cannot find the "[ WebEdit ]" object's parent "[ Browser ]" (class Browser). Verify that parent properties match an object currently displayed in your application.

 

So please help me out.

 

SystemUtil.Run "iexplore.exe", "http://www.nextgeninternational.com/contact-us-/enquiry-form.html"
wait 10

Set OBrowser =Description.create
OBrowser("creationtime").value="0"
OBrowser("micclass").value="Browser"
Set OPage= Description.Create

Set OName=Description.Create

OBrowser("name").value = "Enquiry Form :: Contact Us :: Nextgen"
OPage("title").value = "Enquiry Form :: Contact Us :: Nextgen"

OName("micclass").value="WebEdit"
OName("html tag").value="INPUT"
OName("html id").value="enq_name"
OName("type").value="text"
OName("Name").value="form[enq_name]"

Browser(OBrowser).page(OPage).WebEdit(OName).Set "dhanraj"

 

Views: 1149

Reply to This

Replies to This Discussion

Hi,

I am not sure, I don use Automation Tool but i do know scripting. Just try to do this,

OName("html tag").value="INPUT". set "your name"

Try this out..

Thank you for your reply but still its not working ...

You don't need Browser Name property and Page title property initialization, remove them.

use CreationTime=0 for page property too.

Use ChildObjects of WebEdit from your page and do set your name.

Check this...its working code...

Reason for your error message : There is table on this page which has this Name edit box within it .Both table and name edit box have same name "form[enq_name]".

Revert for more clarification or any other help needed.

Sandeep Panghal

SystemUtil.Run "iexplore.exe", "http://www.nextgeninternational.com/contact-us-/enquiry-form.html"
wait 10

Set OBrowser =Description.create
OBrowser("creationtime").value=0
OBrowser("micclass").value="Browser"
Set OPage= Description.Create

Set OName=Description.Create
OBrowser("name").value = "Enquiry Form :: Contact Us :: Nextgen"
OPage("title").value = "Enquiry Form :: Contact Us :: Nextgen"


OName("Class Name").value="WebEdit"
OName("html tag").value="INPUT"
OName("html id").value="enq_name"
Browser(OBrowser).page(OPage).WebEdit(OName).Set "dhanraj"

Bravo!!

Thank you so much for taking time to look into my issue.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service