Extract value of INPUT tag

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
RabbitChaser
Newbie
Posts: 3
Joined: Thu Jun 03, 2010 8:54 pm

Extract value of INPUT tag

Post by RabbitChaser » Thu Jun 03, 2010 9:28 pm

I need to extract the value of an INPUT tag. I have the tag name and id. I would like to use ExtractByTagName instead of ExtractTag because the field will not always have the same index on the page, but, it does not work. ExtractByTagName always returns blank.

When I use ExtractByTagName on a SPAN, it works fine. If I use it on the TD that surrounds the INPUT and set it to give me all of the HTML, then I can see the INPUT. But what I really want is just to get the value of the INPUT tag.

Help?

Thanks.

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Thu Jun 03, 2010 9:35 pm

Could you post a sample of the HTML that is giving you problems?

RabbitChaser
Newbie
Posts: 3
Joined: Thu Jun 03, 2010 8:54 pm

Post by RabbitChaser » Thu Jun 03, 2010 9:55 pm

This is the TD that contains the INPUT I want the value of:



This is the TD that contains the SPAN I can get the value of:

145564375897556

If I open this page in WeRecorder and use the tag extraction wizard, it can extract the value of the INPUT using ExtractTag and the tags index, but like I said, I don't really want to do it that way because the index will not be consistent.

Is there a way to find an element by it's name or id and then get it's index?

Thanks.

RabbitChaser
Newbie
Posts: 3
Joined: Thu Jun 03, 2010 8:54 pm

Post by RabbitChaser » Fri Jun 04, 2010 11:53 pm

I've switched to using VBscript to manipulate my IE window. It's working well, and it's much faster.

birdmantk
Newbie
Posts: 1
Joined: Sun Jul 20, 2014 5:11 am

Re: Extract value of INPUT tag

Post by birdmantk » Sun Jul 20, 2014 5:12 am

Can you post a sample of how you accomplished this via vbscript?

clarcks
Newbie
Posts: 1
Joined: Wed Apr 08, 2015 4:46 am

Re: Extract value of INPUT tag

Post by clarcks » Wed Apr 08, 2015 4:49 am

I've switched to using VBscript to manipulate my IE window. It's working well, and it's much faster.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts