My method is:
[CodedStep(@
"Click 'ContentPlaceHolder1RgPRgRBtnRunButton'"
)]
public
void
getClientReports_CodedStep1()
{
List<HtmlTableRow> advancedReports =
new
List<HtmlTableRow>();
List<HtmlTableRow> classicReports =
new
List<HtmlTableRow>();
ReadOnlyCollection<HtmlInputButton> expandButtons = Pages.TargetPage.Find.AllByAttributes<HtmlInputButton>(
"class=rgExpand"
);
foreach
(HtmlInputButton expandBtn
in
expandButtons)
{
expandBtn.Click(
false
);
}
ReadOnlyCollection<HtmlTableRow> reportRow = Pages.VergeSolutionsLLC86.Find.AllByXPath<HtmlTableRow>(
"//table[@class='rgMasterTable']/tbody/tr[contains(@id,'ContentPlaceHolder1')]"
);
system = Pages.TargetPage.Find.ById(
"ctl00_ucHeader_lblSystem"
).InnerText;
org = Pages.TargetPage.Find.ById(
"ctl00_ucHeader_l_hco"
).InnerText;
foreach
(HtmlTableRow row
in
reportRow)
{
ReadOnlyCollection<HtmlTableCell> cells = row.Find.AllByTagName<HtmlTableCell>(
"td"
);
if
(cells.Count > 5)
{
if
(cells[5].InnerText ==
"Advanced"
)
{
reportName = cells[1].InnerText;
HtmlInputButton btnRun = cells[6].Find.AllByTagName<HtmlInputButton>(
"input"
)[0];
btnRun.Click(
false
);
System.Threading.Thread.Sleep(5000);
Manager.ActiveBrowser.Window.Maximize();
Manager.Log.CaptureBrowser(Manager.ActiveBrowser, system +
"."
+ org +
"."
+ reportName);
Manager.Browsers[1].Close();
}
if
(cells[5].InnerText ==
"Classic"
)
{
reportName = cells[1].InnerText;
HtmlAnchor btnRun = cells[6].Find.ByContent<HtmlAnchor>(
"Run"
);
btnRun.Click();
System.Threading.Thread.Sleep(5000);
Manager.ActiveBrowser.Window.Maximize();
Manager.Log.CaptureBrowser(Manager.ActiveBrowser, system +
"."
+ org +
"."
+ reportName);
Manager.Browsers[1].Close();
}
}
}
}
I want to capture all report outputs as images. This runs fine the first time through. The second time this runs, I get the error: "A generic error occurred in GDI+". The folder to which I am writing has write permissions (it wrote the file the first time through).
Any help with this error would be most helpful.
Thanks.
Hi,
I have an scenario to set cell value on a data grid by using with OnKeypress event. It is working and I can able to set value to the first selected row cell, but I couldn’t able to set the value to next selected row cell. It is always trying to set the value to first selected row cell instead of set value to next selected row cell.
I have noticed the first row cell is still selected even though I have select the next row cell. My issue, I don’t know how to clear onkeypress event from first row cell after set value.
Please help me in resolving this problem. I am looking for a C# code example.
Waiting for your reply.
Thanks
Ganga S
BaseURL
Specific server/company I’m testing
Remainder of URL (I was on same page for all three when I copied URL.)
User ID (my logged user ID (system assigned))