Micro Focus QTP (UFT) Forums
How to enter text in webedit field..... - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to enter text in webedit field..... (/Thread-How-to-enter-text-in-webedit-field)



How to enter text in webedit field..... - Unleash Rajesh - 08-13-2011

Hi...

I need to enter the login credentials of Username and Pwd......and to hit the login button....But it throws an errors stating,

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

Code used is,
Code:
Set id = description.Create()
id("html tag").value = "INPUT"
id("html id").value = "email"
id("name").value = "email"
id("type").value = "text"
id("X").value = "568"
id("Y").value = "385"
id("type").value = "text"

Browser("title:= Login").Page("title:= Login").WebEdit( id ).Set  "subha@gmail1.com"

Trying this to resolve for the past week....but couldn't...Get me out..


RE: How to enter text in webedit field..... - sshukla12 - 08-16-2011

Try this:

Code:
Set id = description.Create()
id("html tag").value = "INPUT"
id("type").value = "text"

Browser("title:= Login").Page("title:= Login").WebEdit( id ).Set "subha@gmail1.com"

Regards,
Sankalp


RE: How to enter text in webedit field..... - Unleash Rajesh - 08-16-2011

Thanks.....But its not working..




RE: How to enter text in webedit field..... - Tarik Sheth - 08-16-2011

Hi,

Please try descriptive for both Browser and Page as well.


RE: How to enter text in webedit field..... - mrerek - 08-16-2011

Try this

Code:
Browser("title:= Login").Page("title:= Login").WebEdit("html tag:=INPUT").Set "subha@gmail1.com"

If that doesn't work you could have a frame missing from the tree. I would then try removing the page object and just use the Browser object and the WebEdit object. [This is what I do].


RE: How to enter text in webedit field..... - gaveyom - 08-26-2011

Hi,

the above codes will not work, instead of "name" they mentioned "title" in Browser class

Browser("name:=Google") is correct
Browser("title:=Google") is not correct

below both are correct u can use any one from this

definitely this will work

Code:
Browser("micclass:=Browser").Page("micclass:=Page").WebEdit("html id:=email").set "xyz@gmail.com"

Browser("name:=Login").Page("title:=Login").WebEdit("html id:=email").set "xyz@gmail.com"


Regards,
G@veyom


RE: How to enter text in webedit field..... - SQT - 09-01-2011

Rajesh , Just add the following property also for Text box:
Code:
Set id = description.Create()
id("micclass").value = "WebEdit"

Rest is fine.It will defimately work Smile