Using Ranorex version: 2.1.0.6243 with DevExpress components.
When I have a valid tree control and I try to use the ExpandAll() method, nothing happens. The tree does not expand and I do not receive any sort of exception. Just nothing.
Tree.ExpandAll() Does not seem to work
Tree.ExpandAll() Does not seem to work
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Tree.ExpandAll() Does not seem to work
Hi ciege,
DevExpress are third-party controls and we provide a basic support over MSAA. So it`s possible that some functionality doesn`t work. Although you can use invoke remotly to activate functionality directly from the control. If you use XtraTreeList or something similiar 'invoke remotely' the ExpandAll() method from the tree.
Regards,
Christian
Ranorex Support Team
DevExpress are third-party controls and we provide a basic support over MSAA. So it`s possible that some functionality doesn`t work. Although you can use invoke remotly to activate functionality directly from the control. If you use XtraTreeList or something similiar 'invoke remotely' the ExpandAll() method from the tree.
Regards,
Christian
Ranorex Support Team
Re: Tree.ExpandAll() Does not seem to work
Thanks, I'll look into that.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Tree.ExpandAll() Does not seem to work
I'm afraid my limited mastery of C# has me stumped on this one... I am just not sure how to code this up.
Can you help?
Can you help?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Tree.ExpandAll() Does not seem to work
Sure!
By the way, there`s an invoke remotely call in the WinformsTestSample (search: SetDateTime).
A short introduction:
FIrst create your delegate method.
e.g.
e.g.
Christian
Ranorex Support Team
By the way, there`s an invoke remotely call in the WinformsTestSample (search: SetDateTime).
A short introduction:
FIrst create your delegate method.
e.g.
static object CallExpandAll(System.Windows.Forms.Control control, object input) { (control as DevExpress.XtraTreeList.TreeList).ExpandAll(); return null; }Cast your DevEx TreeView to 'Ranorex.Control' and call 'Invoke Remotely'.
e.g.
Ranorex.Control elementTreeList1 = "/form[@controlname='Form1']/element[@controlname='treeList1']"; elementTreeList1.InvokeRemotely(CallExpandAll);Best regards,
Christian
Ranorex Support Team
Re: Tree.ExpandAll() Does not seem to work
Thank you! I will have a look at this and see what I can do with it. I appreciate the help!
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: Tree.ExpandAll() Does not seem to work
OK, that works great.
One issue though. After I run this code in debug mode, the next time I edit and build my code in VS I fail with an error saying
How do I debug run this code, then be able to break out of it and clean up. What do I need to do to close the process that is using my .EXE?
Thanks...
One issue though. After I run this code in debug mode, the next time I edit and build my code in VS I fail with an error saying
I need to exit VS and my AUT, then restart both to be able to build again.unable to copy file "obj\Debug\MYTEST.exe" to "bin\Debug\MYTEST.exe"/ The process cannot access the file "bin\Debug\MYTEST.exe" because it is being used by another process.
How do I debug run this code, then be able to break out of it and clean up. What do I need to do to close the process that is using my .EXE?
Thanks...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Tree.ExpandAll() Does not seem to work
Hi,
see recently forum post:
http://www.ranorex.com/forum/compilatio ... lit=invoke
Regards,
Christian
Suppor Team
see recently forum post:
http://www.ranorex.com/forum/compilatio ... lit=invoke
Regards,
Christian
Suppor Team
Re: Tree.ExpandAll() Does not seem to work
Thanks for the info on this. Quite a shame the workaround. When I am testing my code I usually need my AUT in a specific state. If I have to shut it down and reset the state each time it is quite a pain and time consuming.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Tree.ExpandAll() Does not seem to work
I agree, that can be annoying. The problem is that you cannot unload assemblies once they are loaded in a process (except for when they are in a separate AppDomain, but that isn't possible in that case). And your assembly needs to be loaded to be able to invoke the delegate at the automated process.
Once you have finished writing an InvokeRemotely delegate, you should move it to a separate DLL that does not have to be compiled all the time. Sorry, but that's the best workaround I can offer
Regards,
Alex
Ranorex Support Team
Once you have finished writing an InvokeRemotely delegate, you should move it to a separate DLL that does not have to be compiled all the time. Sorry, but that's the best workaround I can offer
Regards,
Alex
Ranorex Support Team
Re: Tree.ExpandAll() Does not seem to work
Understood, and I am not blaming you (Ranorex)... I'd rather have the pain now of debugging then have the pain of relying on all the lines of code I wrote to do the ExpandAll when just doing the InvokeRemotely works so well.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...