Search found 34 matches

by sham526
Tue Feb 12, 2013 1:40 pm
Forum: Automation API
Topic: how to check for label state change
Replies: 11
Views: 2279

Re: how to check for label state change

u can try this :

Boolean flag_found=false;

do
{
flag_found=Validate.Exists("./form//label[@id~'.*complete$']",5000,"Check Object '{0}'",false);
} while (flag_found);

It will wait for 5Seconds every time and checks for the Id of the Label element.
by sham526
Mon Oct 08, 2012 1:12 pm
Forum: Automation Tools
Topic: problem in parameterizing the element definition(x-path)
Replies: 9
Views: 2440

Re: problem in parameterizing the element definition(x-path)

Hi Shruthi try the below (in Vb.Net) Dim li_each As LiTag = Nothing Dim bool As Boolean = Host.Local.TryFindSingle(".//ul[#'CurrentTags']/li", li_each) If bool Then 'Now search for the Span Tag with the index from CSV File Dim span_each As SpanTag = li_each.FindSingle(Of SpanTag)("./span[@childindex...
by sham526
Mon Oct 08, 2012 1:10 pm
Forum: Automation Tools
Topic: problem in parameterizing the element definition(x-path)
Replies: 9
Views: 2440

Re: problem in parameterizing the element definition(x-path)

Instead u can Try

.//ul[#'CurrentTags']/li/span['$var_tagnumber$']
by sham526
Fri Oct 05, 2012 5:59 am
Forum: Object Identification and Technologies
Topic: XPATH
Replies: 1
Views: 2062

Re: XPATH

First Try This(matches all elements starting with text value ldc):

.//div[#ID']/table/tbody/tr[2]/td[2]/iframe//a[@text~'(?i:ldc.*)']

If Not then Try this(Case insensitive)

.//div[#ID']/table/tbody/tr[2]/td[2]/iframe//a[@text~'(?i:ldctl00_ct[0-9)_btn']
by sham526
Thu Sep 20, 2012 6:29 am
Forum: Automation API
Topic: row count and col count
Replies: 10
Views: 8412

Re: row count and col count

Hi Sara24, i converted the code from vb.net to C#.Net, and it gave below.Just Try this. For all the rows present in the table it will get u the 3,4,5 column data. TdTag temp_td = null; bool @bool = Host.Local.TryFindSingle(".//td[@id='ReportCell']", temp_td); IList<TrTag> list_trtag = temp_td.Find<T...
by sham526
Tue Sep 18, 2012 6:57 am
Forum: Object Identification and Technologies
Topic: Count No of Links in Google
Replies: 2
Views: 2279

Re: Count No of Links in Google

The one which i mentioned was the shortest and easiest way(i tried a lot of ways before posting). 1)Launch IE and proceed to Google. 2)Input term 'Ranorex' and Click on Search button. 3)Wait till the document loads.(page refresh stops) 4) Dim links_site As IList(Of Unknown) = Web_doc.Find(Of Unknown...
by sham526
Tue Sep 18, 2012 6:53 am
Forum: Automation API
Topic: row count and col count
Replies: 10
Views: 8412

Re: row count and col count

Using ILIST(VB.Net): Dim temp_td As TdTag = Nothing Dim bool As Boolean = Host.Local.TryFindSingle(".//td[@id='ReportCell']", temp_td) 'For ROW Count Dim list_trtag As IList(Of TrTag) = temp_td.Find(Of TrTag)("./table/tbody/tr") MsgBox("The Row count Found was : " + list_trtag.Count.ToString) 'Now G...
by sham526
Tue Sep 18, 2012 6:44 am
Forum: Automation API
Topic: How to convert string to repo item path
Replies: 4
Views: 3246

Re: How to convert string to repo item path

U can try the below one also.
String str_btn = repo.Application.ButtonInfo.GetPath.ToString();
by sham526
Tue Sep 18, 2012 6:39 am
Forum: Automation API
Topic: How to make generic function for different type of controls
Replies: 9
Views: 3501

Re: How to make generic function for different type of controls

Sorry for the late response.In that case search for each element before calling the function. Example(In Vb.Net) Dim btn_ok as InputTag=nothing Dim bool as boolean=Host.Local.TryfindSingle("./dom[]//InputTag[@InnerText='ok']",btn_ok) If bool then 'Call the Function that clicks the btn. enterfname("j...
by sham526
Thu Sep 13, 2012 6:22 am
Forum: Automation API
Topic: How to make generic function for different type of controls
Replies: 9
Views: 3501

Re: How to make generic function for different type of controls

If the elements were stored in Repository then simply call the function as below.
enterfname("joe",Recording1.Repo.------.MyinpTag)
by sham526
Wed Sep 12, 2012 6:45 am
Forum: Automation API
Topic: How to make generic function for different type of controls
Replies: 9
Views: 3501

Re: How to make generic function for different type of controls

U can try like this:
Pass the inputTag also as the parameter, so that it can be a reusable function.

public void enterfname(string fname,InputTag myTag)
{
inputtag fnameField = myTag
fnameField .value=fname;
-------------
-------------
}
by sham526
Mon Sep 10, 2012 10:03 am
Forum: Object Identification and Technologies
Topic: Count No of Links in Google
Replies: 2
Views: 2279

Re: Count No of Links in Google

Can try this:(Using VB.Net) Process.Start("iexplore.exe","http://www.google.com") delay.Milliseconds(5000) Dim Web_doc As WebDocument=Nothing Dim bool As Boolean=host.Local.TryFindSingle("/dom[@domain='www.google.co.in']",Web_doc) If bool Then Dim search_inputtag As InputTag=Web_doc.FindSingle(Of In...
by sham526
Thu Jul 12, 2012 6:32 am
Forum: Object Identification and Technologies
Topic: control visible or not
Replies: 13
Views: 6611

Re: control visible or not

First the argument must be declared as ranorex.unknown type instead of Ranorex.Table or something like that
and the function can be
Public Function FnElement_Visibility_Check(rxpath as Ranorex.Unknown) As Boolean
************
****************
End Function