How to Read Text from Webipage when its disabled


#1

the webpage i m testing has many list box, text box, radio butons etc…
and it has Text field which is in Diabled and its not Text box;
eg:once after registering in website, the name field bcomes disabled and
its in Table format…

find the attached screen and element source Base Premimum…how to read
the datas and store it in exce,csv or anything

<META

http-equiv=“Content-Type” content=“text/html; charset=utf-8”>

$3,498.36

#2

On May 13, 11:25 am, Rase In removed_email_address@domain.invalid wrote:

the webpage i m testing has many list box, text box, radio butons etc…
and it has Text field which is in Diabled and its not Text box;
eg:once after registering in website, the name field bcomes disabled and
its in Table format…

A table is not the same thing as a disabled input control. However, it
doesn’t really matter when all you want to do is extract the data.

find the attached screen and element source Base Premimum…how to read
the datas and store it in exce,csv or anything

You read the data the same way you’d read any HTML data, with an HTML
parser. First, you determine how to uniquely and consistently identify
the data you want to extract. Second, you construct an expression to
extract it.

I will provide an example using Nokogiri. Let’s assume that you want
the dollar value that is always in the TD under the TBODY that has and
id of “policyForm:_id69:tbody_element”. Here’s what you can do:

doc = Nokogiri::HTML(html)
puts doc.search(’//tbody[@id=“policyForm:_id69:tbody_element”]/tr/
td’).inner_html

– Mark.