Page 1 of 1

Objects cannot be found

Posted: Fri Apr 25, 2014 9:28 pm
by jonesj
I am setting up automation on this web page. There are more than 50 elements on the page so some of the data is not visible on the web page. I use Ranorex spy to see the elements and there are many elements that are not visible and set to visible.
I feel like I shouldnt have to use EnsureVisible because it scrolls through the page which takes a long time.

So here is my code.
DivGrid = document.FindSingle("/dom//div[#'gbox_grid1']"); //root of grid
TBodyTag tbody = DivGrid.FindSingle("/dom//table[#'grid1']/tbody");
subTotals = tbody.Find<TrTag>(".//tr[@class='ui-widget-content jqgrow ui-row-ltr']");

for(int i = 0; i< subTotals.Count; i++)
{
//subTotals.EnsureVisible(); <- so when this is not commented out I get the elements but of I commented it out I get nothing.
tdSubTotal = subTotals.Find<TdTag>(".//td[@valid ='true']"); <- if I remove the visiblity = true then I get every element within the tag which I dont need.

//Report.Info(i +" : "+ tdSubTotal[tdSubTotal.Count - placeCount].InnerText.ToString());
subTot = subTot + convertToNum(tdSubTotal[tdSubTotal.Count - placeCount].InnerText.ToString());
}

Re: Objects cannot be found

Posted: Fri May 02, 2014 10:09 am
by Support Team
Hello jonesj,

Can you please specify the issue in more detail?
I am setting up automation on this web page.
Do you mean the Ranorex website?
Can you please post a Snapshot file of your application if it is not our website. Additionally it would be helpful to get access to your application in order to reproduce the issue.
I feel like I shouldnt have to use EnsureVisible because it scrolls through the page which takes a long time.
Does that mean EnsureVisible is working, but it is working slow?
I tried to reproduce the issue with a sample page, but in my case everything works as expected.
Which browser are you using?

Please try to use the Ensure Visible feature in Ranorex Spy.
EnsureVisible.jpg
Can you please also check if the setting "Use Ensure Visible by default" is enabled within the General Settings dialog?
Please take a look at the section General Ranorex Settings on our website in order to get more information where this setting can be found.

Regards,
Bernhard