Sometime it’s hard to iterate through HtmlCell and click on Html Button or Radio Button or Check-boxes which is within HtmlCell. In my previous post, I have already described How to get InnerText of HtmlCell and now I am providing sample code to click on HtmlButton.

Here we go-

public void ClickonButton ()
HtmlTable PackageTable = new HtmlTable(browser);
PackageTable.SearchProperties.Add(“Id”, “TableID”);
HtmlCell Cell = new HtmlCell(PackageTable);
Cell.FilterProperties[HtmlCell.PropertyNames.RowIndex] = RowNumber.ToString();
Cell.FilterProperties[HtmlCell.PropertyNames.ColumnIndex] = CellNumber.ToString();
HtmlInputButton SaveBtn = new HtmlInputButton(Cell);
SaveBtn.SearchProperties.Add(“Id”, “btnPubPkg”);

Comment it out if it does not work for you.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s