Link to home
Start Free TrialLog in
Avatar of 66chawger
66chawgerFlag for United States of America

asked on

How to scrape check box from a site and value as checked

I am scraping a client's site and rendering their screens through my user control (scraping).  At the end I have the need to value a check box as checked so I can proceed to render a button which creates a report.  Look at my code snippet below to see what I have done so far.
--the following gets finds the button "btnPrint" and renders it as clicked.  This works fine.
IHTMLElement InputUsrID = (IHTMLElement) doctitle.GetAll().Item("btnPrint",0);
InputUsrID.Click();
 
-- the following is like above, but this time it is a check box and I need to find it as well as value it as checked.  I am not sure about the syntax for the checkbox and if it is the same as I have done above
 
IHTMLElement InputUsrID = (IHTMLElement) doctitle.GetAll().Item("PolicyReportsQuoteSummary",0);
InputUsrID.Click();

Open in new window

Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Can you use document.getElementsByTagName or document.getElementById?

Bob
ASKER CERTIFIED SOLUTION
Avatar of 66chawger
66chawger
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If your happy, I'm happy.

Bob