Page 1 of 1

Scan Data on grid is not working

Posted: Wed Dec 18, 2013 1:12 pm
by yoad
Hello Support,
Scan is not working on all Data(I Added snapshot file for it)
it is working partial


string headerName = "x-grid-header-row";
                string className = "";
               
//              TableTag someTableTag ="dom[@domain='102.101.100.131:7019']//table[@id~'gridview']//tbody[@id~'gridview']/tr//div[@innertext~'.+']"

//                TableTag someTableTag ="/dom[@domain='102.101.100.131:7019']//div[@id~'gridview']/table";
//                IList<TrTag> rows = someTableTag.FindDescendants<TrTag>();

                IList<DivTag> rows=Host.Local.Find<DivTag>("dom[@domain='102.101.100.131:7019']//table[@id~'gridview']//tbody[@id~'gridview']/tr//div[@innertext~'.+']");
                
                for(int i=0; i<3&&rows.Count>=3; i++)
                {
                               className = rows.Element.GetAttributeValueText("Class");
                               
                               rows.MoveTo();
                               
                               if(className != headerName)
                               {
                                               foreach (DivTag cell in rows.Find("./td/div"))
                                               {
                                                               // Move the mouse to each cell element
 
                                                               if ((string.IsNullOrEmpty(cell.InnerText)))
                                                               {
                                                                              Report.Warn(cell.ToString());
                                                                              
                                                               }
                                                               else
                                                               {
                                                                              Report.Info(cell.ToString());
                                                               }
                                                              
                                                               cell.MoveTo();
                                                               // Set css style
                                                               cell.SetStyle("background-color", "#33ff00");
                                                              
                                               }
                               }
                }


Best Regards,
Yoad

Re: Scan Data on grid is not working

Posted: Mon Dec 23, 2013 2:01 pm
by BernhardS
Hello Yoad,

Can you please describe in more detail what you are trying to do and what exactly is not working?

Regards,
Bernhard