Page 1 of 1

AUT Crashes when Grid.FindDecendent<RawText> called

Posted: Fri Sep 02, 2011 12:51 pm
by mohan
I’ve a gird in AUT which is recognized as 'VSFlexGrid8L' whose RXPath is (“element[@instance='0']/element[@instance='0']/element[@instance='1']/element[@instance='0' and @class='VSFlexGrid8L']”). So in order to click on a particular Item cell, I’m using the following code

RawText itemToClick = objAccounts.FormUserAccounts.
UserAccountsGrid.FindDescendant<RawText>(newUserName);
itemToClick.Click();

When Icall the same above call (FindDescendant<RawText>(newUserName)) for 2nd time down the line of same script, the application under test crashing. Could you please help me to know why this happens and any solution?

Regards,
Mohan

Re: AUT Crashes when Grid.FindDecendent<RawText> called

Posted: Fri Sep 02, 2011 1:44 pm
by Support Team
Hi,
for 2nd time down the line of same script, the application under test crashing
What do you exactly mean, do you mean that your Ranorex TestCase/File crashes or shows an Error/Exception or do you really mean that your application under test crashes?
Can you give us some more information about your AUT and your System (OS, Ranorex Version), and of course a Ranorex Snapshot would be also very helpful.
element[@instance='0']/element[@instance='0']/element[@instance='1']/element[@instance='0' and @class='VSFlexGrid8L']
In your case Ranorex uses an attribute (instance) that can vary after each restart of your AUT, can you check if you can select other unique ones?
Therefor please take a look a the following blogs:
http://www.ranorex.com/blog/eliminate-d ... norexpaths
http://www.ranorex.com/blog/ranorexpath-tips-and-tricks

Because you mentioned RawText are you using our GDI Capture Plug-In?

Regards,
Markus
Ranorex Support Team

Re: AUT Crashes when Grid.FindDecendent<RawText> called

Posted: Fri Sep 02, 2011 2:39 pm
by mohan
When I call the method SelectCellValue() for first time, it works. But when I call it second time, the application under Test crashes.

public static void SelectCellValue(Ranorex.Unknown gridName, string value)
{
RawText itemToClick = gridName.FindDescendant<RawText>(value);
itemToClick.Click();
}

The AUT is developed in VB 6.0 which Uses FlexGrids. Ranorex identifies Ranorex.Unknown ‘VxFlexGrid8L’ with GDI capture plug-in.

I’m using OS: WinXP sp1 and Ranorex 3.1.0. Please find the attached snapshot.

Re: AUT Crashes when Grid.FindDecendent<RawText> called

Posted: Mon Sep 05, 2011 10:54 am
by Support Team
Hi,

Do you have tested if the RxPath to the specific Grid is still the same after a restart of your application?
Please try to use the "Form 'User Accounts'" to search for your RawText item.
public static void SelectCellValue(Ranorex.Form formName, string value)
{
RawText itemToClick = formName.FindSingle(".//rawtext[@caption='"+value+"']");  
itemToClick.Click();
}
Can you send us your AUT and the Ranorex project if this won't work , you can send it to our [email protected] mail address.

Regards,
Markus
Ranorex Support Team

Re: AUT Crashes when Grid.FindDecendent<RawText> called

Posted: Thu Sep 08, 2011 11:09 am
by mohan
appriciate for the reply.

1. "Do you have tested if the RxPath to the specific Grid is still the same after a restart of your application?"
Ans: Yes, the RxPath remains same eventhough after restart of application

2. Even though I use "formName.FindSingle(".//rawtext[@caption='"+value+"']"); " rater FindDecendent, the AUT crashes. I also tried with Find, FindChild, TryFindSingle.. all leads to same result. Note:- After calling any of the API of Find, I am able to get the RawText but then the application crashes and could not proceed further. Please find the attachement.

3. I'm very sorry to say that neighther I could send AUT nor Ranorex project.

4. I spent lot of time to figure out the issue why AUT crashing, but could not !!! But I'm sure that I can spy the gird perfectly eventhoug i restart application. The attribute (instance) works fine in this case. Please provide me some suggestion.



Thanks in advance,
Mohan

Re: AUT Crashes when Grid.FindDecendent<RawText> called

Posted: Thu Sep 08, 2011 2:02 pm
by Support Team
Hi,

This is a difficult problem, it could be that there is a internal error, so we would need your application to reproduce this problem.
Since this is not possible we would suggest to set up an online meeting for the next week if it is okay for you?
Is Wednesday at about 3 pm CEST okay?
If you like you can reply via Email: [email protected].

Regards,
Markus
Ranorex Support Team