Set a Value in a WebElement

2,366 views
Skip to first unread message

Sheik Adil

unread,
Jul 4, 2011, 7:44:03 AM7/4/11
to mercu...@googlegroups.com
HI All,
          I want  to set a value in a WebElement.how to enter a value in WebElement.
help me
Thanks,
Ad
 
 

Santosh Gupta

unread,
Jul 4, 2011, 10:57:36 AM7/4/11
to mercu...@googlegroups.com
Try this ........... B("").P("").Frame("").WebElement("").object.innertext "ABC"
 
cheers
$

--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Sheik Adil

unread,
Jul 6, 2011, 8:27:24 AM7/6/11
to mercu...@googlegroups.com
Hi Santhosh,
                     i'm not able to set value in web element using the code that u provided
iz there any other option. help me its urgent
Thanks
Ad

Sudheer T

unread,
Jul 6, 2011, 9:15:26 AM7/6/11
to mercu...@googlegroups.com
if it is identified as webelement , it is nothing but it is not identifing the object. you can make use of virtual object..

On Mon, Jul 4, 2011 at 8:27 PM, Santosh Gupta <est...@gmail.com> wrote:

gopi nath

unread,
Jul 6, 2011, 9:16:47 AM7/6/11
to mercu...@googlegroups.com
Browser(XX).Page(XX).WebElement(XX).SetTOProperty "innertext","your value"
 
Try with this....

Sheik Adil

unread,
Jul 6, 2011, 9:27:26 AM7/6/11
to mercu...@googlegroups.com
Hi sreedhar,
                 its identifying but i'm not able to set the value i tried the below code
Browser("micclass:=Browser").page("micclass:=Page").Frame("html tag:=IFRAME").WebElement("html tag:=BODY").Object.innertext "adil"
but its not working if you have any other option share
Thanks
Adil

Sheik Adil

unread,
Jul 6, 2011, 9:27:55 AM7/6/11
to mercu...@googlegroups.com
Hi Sudheer,

                 its identifying but i'm not able to set the value i tried the below code
Browser("micclass:=Browser").
page("micclass:=Page").Frame("html tag:=IFRAME").WebElement("html tag:=BODY").Object.innertext "adil"
but its not working if you have any other option share
Thanks
Adil


On Wed, Jul 6, 2011 at 6:45 PM, Sudheer T <sudheer.be@gmail.com> wrote:

Sheik Adil

unread,
Jul 7, 2011, 1:21:18 AM7/7/11
to mercu...@googlegroups.com
Hi Gopi,
     the code given by u may work for the objects present in OR but i'm using
Descriptive Programming i believe it wont work. do you have any other option
if yes then share.
Thanks
Adil

Revanth

unread,
Jul 7, 2011, 1:56:46 AM7/7/11
to mercu...@googlegroups.com
Hi Sudheer,

Can you Please try this

Set ObjWebElement = Browser("micclass:=Browser").page("micclass:=Page").Frame("html tag:=IFRAME").WebElement("html tag:=BODY")
ObjWebElement.Object.innertext = "adil"

Thanks,
Revanth

vamsi veluri

unread,
Jul 7, 2011, 2:21:16 AM7/7/11
to mercu...@googlegroups.com
Hi Adil,
 
Better to use WScript to handled this type of situations
 set a=createobject("wscript.shell")
wait(2)
a.sendkeys "kamani"
a.sendkeys "{Tab}"
Regards,
Vamsi
Reply all
Reply to author
Forward
0 new messages