| View previous topic :: View next topic |
| Author |
Message |
jabelshauser
Joined: 23 Aug 2007 Posts: 20
|
Posted: Mon Apr 14, 2008 4:12 pm Post subject: how can a tooltip be tested ? |
|
- Ranorex-Pro
- .Net: 1.1 |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 344
|
Posted: Mon Apr 14, 2008 8:28 pm Post subject: |
|
A ToolTip is a top level window, you can find it with the Application.FindForm function.
Please use the following code to find out some information about the tooltip.
(This will print out the class name and text of all visible top level application.)
Code: click into code to enlarge
for (int i = 0; i < 30; i++)
{
foreach (Form f in Application.Forms)
{
Console.WriteLine("Text={0} {1}", f.ClassName, f.Text);
}
Application.Sleep(1000);
Console.WriteLine("\n");
}
Jenö
Ranorex Team |
|
| Back to top |
|
 |
jabelshauser
Joined: 23 Aug 2007 Posts: 20
|
Posted: Tue Apr 15, 2008 12:45 pm Post subject: |
|
ok so far, but a following question:
a) The Control is always available, regardless to the visibility of the tooltip:
_obj = tooltipframe.FindControlName("labelContent");
b) The Control is only avl. if the Tooltip is visible:
foreach (Control ctrl in tooltipframe.Controls)
{
if(ctrl.Name == "labelContent") // control only avl. if visible
_obj = ctrl;
}
These 2 variants should have the same behaviour, whats the difference ? |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 344
|
Posted: Tue Apr 15, 2008 1:29 pm Post subject: |
|
a) FindControlName searches for all controls, including hidden ones
b) .Controls returns all visible children
Jenö
Ranorex Team |
|
| Back to top |
|
 |
Aburkut
Joined: 14 Apr 2008 Posts: 3
|
Posted: Thu May 29, 2008 12:04 pm Post subject: ToolTip--please Help |
|
hi,
i am sorry to ask you this simple question(or may you have answered anywhen, before i asked you ...)
how can ich find out the Tooltips for the Elements and ElementChild in a Control. in my situation are they for example: Elements are rows in Table( that is Control) and the Cells are Children of the Elements. all of the children have the Tooltips, which i want to find out and get the informations about them....
please help
thank you
Aburkut |
|
| Back to top |
|
 |
Support Team Site Admin
Joined: 07 Jul 2006 Posts: 344
|
Posted: Thu May 29, 2008 1:50 pm Post subject: |
|
Just automate the actions you would do if you tested by hand:
For each cell in the do
- move the mouse to the cell
- wait some time for the tooltip to show
- search for the tooltip window and get its text.
To find out the classname of your tooltip, use the code from the posting above (for Win32 the classname usually is "tooltips_class32" and for .Net Forms "WindowsForms10.tooltips_class32.app.0.378734a").
Alex
Ranorex Support Team |
|
| Back to top |
|
 |
|