Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am Working on Coded Ui automation where at automation code on login page it's not navigating to next page but manually its working .Please help me out from this .

Please find the code :

public void mcp_table(string browser_property, string tbl_property, string tbl_pro_value, string tbl_operation)
{

string cell1;
BrowserWindow browser = new BrowserWindow();
browser.SearchProperties[BrowserWindow.PropertyNames.FriendlyName] = browser_property;
HtmlTable table = new HtmlTable(browser);
table.SearchProperties.Add(tbl_property, tbl_pro_value);
//HtmlCell cell = new HtmlCell(table);
//cell.SearchProperties.Add(tbl_property, tbl_pro_value);

for (int i = 1; i <= 13; i++)
{
for (int j = 1; j <= 5; j++)
{
HtmlCell cell = new HtmlCell(table);
cell.FilterProperties[HtmlCell.PropertyNames.RowIndex] = i.ToString();
cell.FilterProperties[HtmlCell.PropertyNames.ColumnIndex] = j.ToString();

cell1 = cell.InnerText;
HtmlCustom cellCustm = new HtmlCustom(cell);
cellCustm.SearchProperties.Add("InnerText", cell1);
HtmlDiv panehide = new HtmlDiv(browser);
// HtmlDiv panehide= this.FindControl("Id", "processDialog");
panehide.SearchProperties.Add("Id", "processDialog");

// panehide.WaitForControlExist();

//if (i == 1 && j == 1)
//{

//cell1 = cell.InnerText;
//HtmlCustom cellCustm = new HtmlCustom(cell);
//cellCustm.SearchProperties.Add("InnerText", cell1);

// }
int cell2 = Convert.ToInt32(cell1);

if(cell2>0)
{
switch (tbl_operation)
{

case "Click":
Mouse.Click(cellCustm);
// Mouse.
// panehide.EnsureClickable();
Playback.Wait(50000);

break;

case "Exists":

bool html_Tab;

html_Tab =(table.Exists == true);

break;

default:

Assert.Fail();

break;
}

}

else
{

Assert.Fail();
}
}

}

After mouse.click its unable to navigate to next page ...
Posted
Updated 12-Dec-14 2:40am
v2
Comments
ZurdoDev 11-Dec-14 8:52am    
How can we help?
Member 11091358 12-Dec-14 4:49am    
Hi Ryandev ..At login page I am unable to navigate to next page as there is a dialogue box after login click button like Loadingggg so i need to hide that dialogue box through automation coded ui and control type of that dialouge box is Pane .so can u pls give any suggestion on this?
ZurdoDev 12-Dec-14 7:28am    
No one can help unless you post the relevant code. Click improve question and show the relevant code.
Member 11091358 12-Dec-14 8:40am    
I have update the relevant code pls find it ..
ZurdoDev 12-Dec-14 8:48am    
Where's the code that redirects to a new page?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900