Hi Team,
In our AUT, the listitems under the combobox are recognised as Text. (listitem/text[@name='<somename>'].
I want to select a text and then click on the text. Simply textObj.click does not work all the times. If the item is down in the list, it fails to click on the text. Can you please help.
Thanks and Regards,
Aakash
Selecting Text
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Selecting Text
Hi,
Please take a look to our Documentation
http://www.ranorex.com/support/user-gui ... html#c1875
or read following post
http://www.ranorex.com/forum/selecting- ... t=Combobox
Regards,
Peter
Ranorex Support Team
Please take a look to our Documentation
http://www.ranorex.com/support/user-gui ... html#c1875
or read following post
http://www.ranorex.com/forum/selecting- ... t=Combobox
Regards,
Peter
Ranorex Support Team
Re: Selecting Text
Hi,
You can try with the following code as well...
'Item1 - Is the one you want to select from listBox
Dim rxPath As String = String.Format(".//listitem[@accessiblename='{0}']", "Item1")
Dim item As Ranorex.ListItem = Nothing
' Searching for list item based on the created RanoreXPath
Dim found As Boolean = repo.ContainerSelectboxItem.Self.TryFindSingle(rxPath, item)
If found Then
item.[Select]()
item.Click()
Else
Report.Error("Item1 not selected")
End If
Thanks,
Dalsingh
You can try with the following code as well...
'Item1 - Is the one you want to select from listBox
Dim rxPath As String = String.Format(".//listitem[@accessiblename='{0}']", "Item1")
Dim item As Ranorex.ListItem = Nothing
' Searching for list item based on the created RanoreXPath
Dim found As Boolean = repo.ContainerSelectboxItem.Self.TryFindSingle(rxPath, item)
If found Then
item.[Select]()
item.Click()
Else
Report.Error("Item1 not selected")
End If
Thanks,
Dalsingh
-
- Posts: 48
- Joined: Thu Jun 10, 2010 12:06 pm
Re: Selecting Text
Thanks Guys.
Got resolved as:
txtObj.MoveTo
txtObj.Click
Regards,
Aakash
Got resolved as:
txtObj.MoveTo
txtObj.Click
Regards,
Aakash