Ranorex

Capturing Role and Name property

 
Post new topic   Reply to topic    Ranorex Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
mohandasgandhig



Joined: 01 Aug 2007
Posts: 2
Location: Bangalore

PostPosted: 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
View user's profile Send private message Yahoo Messenger
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: 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
View user's profile Send private message Visit poster's website
mohandasgandhig



Joined: 01 Aug 2007
Posts: 2
Location: Bangalore

PostPosted: 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
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> General Questions All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum