Search found 48 matches
- Fri Nov 16, 2012 5:43 pm
- Forum: Object Identification and Technologies
- Topic: Find all instances of a button
- Replies: 13
- Views: 5739
Re: Find all instances of a button
First - Thank you for taking time to answer these precisely. Each iteration of questions gets me closer to the solution. This code works well. IList<DivTag> inners = allspan2.Find<DivTag>(".//td[6]/div[2]"); However it's only returning the first instance of the this tag: Ranorex.TrTag allspan2 = "/d...
- Thu Nov 15, 2012 8:43 pm
- Forum: Object Identification and Technologies
- Topic: Find all instances of a button
- Replies: 13
- Views: 5739
Re: Find all instances of a button
Thank you very much for this information Alex. It has certainly helped create absolute path items. I am grabbing inner text from various rows and counting them. The form changes based on month and needs to handle dynamic changes. The report has several TR tags. I need to add the inner text together ...
- Wed Nov 14, 2012 7:02 pm
- Forum: Object Identification and Technologies
- Topic: Find all instances of a button
- Replies: 13
- Views: 5739
Re: Find all instances of a button
I finally got a sufficient way of doing this. I did use the finddescendents and the Ilist. It took some time to get the code together. However I want to get the full RXpath when building certain elements. I am calling repository items and doing .GetPath().ToString() but I'm only getting relative pat...
- Tue Nov 13, 2012 10:33 pm
- Forum: Object Identification and Technologies
- Topic: Find all instances of a button
- Replies: 13
- Views: 5739
Re: Find all instances of a button
It is set within my code. I just deleted the path when posting.
I am trying to click on all buttons that say "export" on the page.
That's really all I'm trying to do here. Is there anyway to set a simple string and search throughout the page for that and click?
I am trying to click on all buttons that say "export" on the page.
That's really all I'm trying to do here. Is there anyway to set a simple string and search throughout the page for that and click?
- Tue Nov 13, 2012 9:58 pm
- Forum: Object Identification and Technologies
- Topic: Find all instances of a button
- Replies: 13
- Views: 5739
Re: Find all instances of a button
1)
The IList is not working. There is javascript preventing full recursion through tags.
2)
How do I use the GetPath().ToString() to build the full path for each element and THAN find the next one from within the host.local while loop I provided.
Thanks.
The IList is not working. There is javascript preventing full recursion through tags.
2)
How do I use the GetPath().ToString() to build the full path for each element and THAN find the next one from within the host.local while loop I provided.
Thanks.
- Tue Nov 13, 2012 8:31 pm
- Forum: Object Identification and Technologies
- Topic: Find all instances of a button
- Replies: 13
- Views: 5739
Re: Find all instances of a button
That's not working for some reason. I reverted to this. How do you build the absolute path from within here: string mid = "path"; string here; Ranorex.SpanTag btnSp; Duration timeout = 30000; while(Host.Local.TryFindSingle(mid, timeout, out btnSp)) { btnSp.GetPath().ToString(); here = btnSp.ToString...
- Tue Nov 13, 2012 6:19 pm
- Forum: Object Identification and Technologies
- Topic: Find all instances of a button
- Replies: 13
- Views: 5739
Find all instances of a button
For some reason I'm having a problem with this. I've gone for about 2 months with iterating through buttons on pages and finding everything I need. So forgive me for asking something here. But I'm trying to click this export button from every instance within a page. I try to use: ranorex.spantag tag...
- Mon Nov 12, 2012 7:24 pm
- Forum: Object Identification and Technologies
- Topic: @id~'(?i: Issue
- Replies: 1
- Views: 2046
@id~'(?i: Issue
.//tr[@id~'(?i:StringGrid_ctl00__0)']/td[2] I am using this @ID with @id~'(?i: to find an element that has a dynamic path. The static part of the path set is the "StringGrid_ctl00__0" I have a similar grid on the page further down. //tr[#'ctl00_ctl00_Content_ContentPlaceHolderMain_ReportGrid_ctl00_...
- Tue Nov 06, 2012 8:16 pm
- Forum: Automation API
- Topic: Code Accessor Methods
- Replies: 2
- Views: 1998
Code Accessor Methods
I am trying to encapsulate several fields to prevent the typical public proposition from multiple sources. Here is my code within a code module: public static string dateAttached(string dateAttached) { get { return _dateAttached; } set { _dateAttached = value; } } /code] I get formatting errors as e...
- Tue Oct 23, 2012 6:43 pm
- Forum: Object Identification and Technologies
- Topic: Open Browser to Windows Explorer
- Replies: 2
- Views: 5050
Open Browser to Windows Explorer
I am trying to open a browser to a particular path: Host.Local.OpenBrowser(pathVar, "IE", "", false, false); This does not allow for a string varibale to be used as the startup location. I also tried system.diagnostic.process.start("expoloer.exe", path); But for some reason it doesn't open to the co...
- Tue Oct 09, 2012 4:48 pm
- Forum: Object Identification and Technologies
- Topic: Ranorex Path
- Replies: 1
- Views: 1990
Ranorex Path
I am opening an Excel workbook. Each time that workbook changes based on the number of attempts to open. In order to cope with the name change, I located the needed items using this query: workbook[@name>='Prelim']/table/row[@index='10']/cell[@address='E10'] The 'Prelim' name changes. Normally the S...
- Tue Oct 09, 2012 4:45 pm
- Forum: Object Identification and Technologies
- Topic: Getting the div index
- Replies: 16
- Views: 6668
Re: Getting the div index
Put it in a loop and maybe do:
tr[13].moveto();
Find descendents, look in the local variables of the list, and locate the index of the required cell. Move to that index.
I'd need to understand the problem more.
tr[13].moveto();
Find descendents, look in the local variables of the list, and locate the index of the required cell. Move to that index.
I'd need to understand the problem more.
- Thu Oct 04, 2012 8:56 pm
- Forum: Object Identification and Technologies
- Topic: XPATH
- Replies: 1
- Views: 2070
XPATH
I am trying to use XPath to normalize the name of a dynamic element. .//div[#ID']/table/tbody/tr[2]/td[2]/iframe//a[#'IDctl00_ctl38_Btn'] This 38 changes based on row number. I want to use ~[0-9] so that it accepts any number and therefore finds it. How? Like this? But it doesn't work: .//div[#ID']/...
- Thu Oct 04, 2012 8:30 pm
- Forum: Object Identification and Technologies
- Topic: Getting the div index
- Replies: 16
- Views: 6668
Re: Getting the div index
Make a list out of it.
IList<Ranorex.DivTag> myList = tag.findDescendents<Ranorex.DivTag>();
Call the index of the list:
myList[0]
Perform operations
myList[0].InnerText
IList<Ranorex.DivTag> myList = tag.findDescendents<Ranorex.DivTag>();
Call the index of the list:
myList[0]
Perform operations
myList[0].InnerText
- Wed Oct 03, 2012 2:43 pm
- Forum: Object Identification and Technologies
- Topic: .Contains("text") question
- Replies: 4
- Views: 6741
Re: .Contains("text") question
Thanks for your help guys. When I try this bit, I get object not set to to an instance of an object error. myList[1].Click(); myList2[10].Click(); tag.InnerText.Contains("CREATED"); I'm running into a problem with the validation only allowing one word. I want to say attribute contains one of these t...