| View previous topic :: View next topic |
| Author |
Message |
mohandasgandhig
Joined: 01 Aug 2007 Posts: 2 Location: Bangalore
|
Posted: Wed Aug 01, 2007 8:50 am Post subject: Capturing Role and Name property |
|
Hi all,
I am trying to capture Role and name proeprty for toolstrip items but I could not . Is there any specific win32APIs for capturing these proerties?
Please clarify me.
Thanks,
Mohan |
|
| Back to top |
|
 |
admin Site Admin
Joined: 05 Jul 2006 Posts: 351
|
Posted: Wed Aug 01, 2007 5:21 pm Post subject: |
|
The following sample code works with the VS2005Application.exe (Ranorex\Bin\Net2.0 directory).
It searches the toolstrip of the application, finds the toolstrip item with the Role=PushButton and Name="Test Progressbar" and clicks the button.
Code: click into code to enlarge
ToolStrip toolStrip = form.FindToolStrip("toolStrip1");
if (toolStrip != null)
{
// Find the pushbutton of the toolstrip by Role=PushButton and Name="Test Progressbar"
Element progressBarButton = toolStrip.Element.FindChild(Role.PushButton, "Test Progressbar");
if (progressBarButton != null)
Mouse.ClickElement(progressBarButton);
}
Jenö
Ranorex Team |
|
| Back to top |
|
 |
mohandasgandhig
Joined: 01 Aug 2007 Posts: 2 Location: Bangalore
|
Posted: Thu Aug 02, 2007 6:34 am Post subject: |
|
Hi,
Thanks for your quick reply. My questing here is how to capture Role and Name property with out using Ranorex lib files.
Thanks,
Mohan |
|
| Back to top |
|
 |
|