Search found 15 matches

by chall
Fri Sep 07, 2007 3:53 pm
Forum: Automation API
Topic: Selecting Unidentifiable Controls
Replies: 1
Views: 3175

Selecting Unidentifiable Controls

**Situation** User wants to automate clicking 3 check boxes that are located in various positions on a form, though they share the same screen position, points, or coordinates and visible properties are false. The 3 check boxes do not have unique IDs or names that would allow user to identify them. ...
by chall
Thu Sep 06, 2007 5:08 pm
Forum: Automation API
Topic: How would keep a context menu from disappearing?
Replies: 2
Views: 3254

That did it, thanks!
by chall
Thu Sep 06, 2007 4:05 pm
Forum: Automation API
Topic: How would keep a context menu from disappearing?
Replies: 2
Views: 3254

How would keep a context menu from disappearing?

I am trying to make a menu selection using the following code: Ranorex.Menu menu = new Ranorex.Menu(form); string[] menuItems = itemName.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); int numOfMenuItems = menuItems.Length; for (int i=0; i<numOfMenuItems; i++) { if (i==0) { menu.Se...
by chall
Tue Sep 04, 2007 6:40 pm
Forum: Automation API
Topic: How to perform Scroll Bar operation?
Replies: 5
Views: 6887

This is what I do; it may work you: Ranorex.Control control = form.FindControlId(scrollID); if (control != null) { for (int i=1; i<=scrollCount; i++) { Element scrollElement = control.Element.FindChild(Role.PushButton, "Page up"); if (scrollElement != null && (!scrollElement.State.Equals(State.Invis...
by chall
Tue Sep 04, 2007 6:38 pm
Forum: Automation API
Topic: Problem while doing pageup operation in scroll bar
Replies: 2
Views: 3690

This is what I do; it may work you: Ranorex.Control control = form.FindControlId(scrollID); if (control != null) { for (int i=1; i<=scrollCount; i++) { Element scrollElement = control.Element.FindChild(Role.PushButton, "Page up"); if (scrollElement != null && (!scrollElement.State.Equals(State.Invis...
by chall
Wed Aug 22, 2007 11:39 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

I guess you're right. Before I read your solution, I used itemLocation.Offset(5, 3), Mouse.Move(itemLocation) and that worked for me. But I don't believe my solution will cover all situations.

Thanks again for your help, sir.
by chall
Wed Aug 22, 2007 11:04 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

That did it! Thank you very much! How did you determine the point (30, 10)?
by chall
Wed Aug 22, 2007 7:59 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

I would like to add that the Mouse.Position is different from the listItem.location when using the Mouse.Move(listItem.location). The listItem location is displayed as 888,375; and although the Mouse.Position is the same as the listItem location, RanorexSpy displays the Mouse.Position as 888,168. Th...
by chall
Wed Aug 22, 2007 7:17 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

Ranorex.Application.Start("explorer.exe"); Ranorex.Application.Sleep(1000); Ranorex.Form form = Ranorex.Application.FindFormTitle("My Documents", SearchMatchMode.MatchExact, true, 1000); form.Show(); form.Visible = true; Ranorex.ListView listView = form.FindControlId(1); Element listItem = listView....
by chall
Wed Aug 22, 2007 4:49 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

I made a mistake in my description: it's when I invoke MouseToElement() that the cursor points to an unrelated item in another application. I've verified the control name, control ID, element name, and role are correct. Do you have any suggestions?

I apologize for my mistake.
by chall
Wed Aug 22, 2007 3:24 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

Using RanorexSpy and writing the value to the Console, I've verified that the size and location of the listView item are correct.
by chall
Wed Aug 22, 2007 3:15 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

To answer your question, "yes, I have checked the location of the listView item, but I have not checked its size property." Once I find the listView item, I write its name, class, and location to the Console in order to verify that they're the same values that RanorexSpy has. Here are some of the ot...
by chall
Tue Aug 21, 2007 11:06 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

I use the evaluation copy. Here is the code that I use:

ListView list = aForm.Element.FindChild(Role.List, "listViewName");
Element listItem = list.Element.FindChild(Role.ListItem, "listItem");

Mouse.ClickElement(listItem, MouseButtonType.RightButton);
by chall
Tue Aug 21, 2007 9:33 pm
Forum: Automation API
Topic: how can i select multiple row using index of listview
Replies: 4
Views: 4023

Perhaps you can do something like this: int numOfItems = listView.ItemCount; for (int i = 0; i < numOfItems; i++) { string itemName = listView.GetItemText(i, 0); if (itemName.Equals("item1")) { listView.SelectItem(itemName); } }
by chall
Tue Aug 21, 2007 9:14 pm
Forum: Automation API
Topic: Executing right-button mouse clicks
Replies: 14
Views: 9178

Executing right-button mouse clicks

Can someone tell me how to execute a right-button mouse click on a particular element or control? Desired Situation: Open up windows explorer, find a specific list item in a list view, and execute a right-button mouse click on the element or control in order to display the typical pop-up window. Res...