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"
Tags:
Permalink Reply by Lingesh Mukilan on November 1, 2012 at 2:35pm 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..
Permalink Reply by Dhanraj on November 1, 2012 at 2:59pm
Permalink Reply by Subbu on November 3, 2012 at 1:44pm 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.
Permalink Reply by Sandeep Panghal on November 6, 2012 at 4:32pm 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"
Manager QA at IdeaS Revenue Optimization
© 2013 Created by Quality Testing.