Search found 12 matches

by hs.fk
Fri Apr 05, 2013 10:05 am
Forum: Object Identification and Technologies
Topic: Find an Item (as Text) from a list
Replies: 2
Views: 2188

Re: Find an Item (as Text) from a list

You can use a RXPath like this

Code: Select all

/form[@automationid='_frameworkWindow']/form/element/tree/treeitem/text[@name='CPU 315-2AG12 315SB/DPM']/..
Doc
by hs.fk
Thu Mar 21, 2013 2:35 pm
Forum: Automation API
Topic: How to get InfoObjet from element
Replies: 13
Views: 4941

Re: How to get InfoObjet from element

OK, my intention was, that you only pass around the RepoItemInfo, because you can create the Element on demand from it. The downside is that you lose the information which Adapter-Type should be used for that Element (E.g. Button, Text etc.; Necessary for the RepoItemInfoInstance.CreateAdapter-Call)...
by hs.fk
Wed Mar 20, 2013 1:24 pm
Forum: Automation API
Topic: How to get InfoObjet from element
Replies: 13
Views: 4941

Re: How to get InfoObjet from element

Hi, you can use the corresponding RepoItemInfo-Property. It is generated along with the Button-Adapter-Property. Maybe this is what you want: // call PressButton( repo.Button_NyInfo ); // instead of // PressButton( repo.Button_Ny ); public static void PressButton( RepoItemInfo btnInfo ) { Validate.E...
by hs.fk
Fri Mar 15, 2013 1:31 pm
Forum: Automation API
Topic: How to get InfoObjet from element
Replies: 13
Views: 4941

Re: How to get InfoObjet from element

I think 'Adapter.Valid' is what you want, but I'm not quite sure. Returns true if the element is believed to be valid. 'RepoInfoItem.Exists()' internally tries to create a Element with the path from the RepoInfoItem. This can also be done with only the Element. int pid = Host.Local.RunApplication( "...
by hs.fk
Thu Mar 14, 2013 6:15 pm
Forum: Automation API
Topic: How to get InfoObjet from element
Replies: 13
Views: 4941

Re: How to get InfoObjet from element

Can you please explain why you want the RepoItemInfo? I don't see the point in getting the RepoItemInfo if you already have the corresponding Element. Nonetheless, I don't see a useful common indicator between the RepoItemInfo and the Element. The only thing that could be used is the path, but the E...
by hs.fk
Fri Mar 08, 2013 10:49 am
Forum: General Questions
Topic: Get size(pixel) of element found by spy in code
Replies: 1
Views: 2735

Re: Get size(pixel) of element found by spy in code

Ranorex.Button btnStart = "/button[@text='Start']";
Report.Info( string.Format(
  "Win-Startbutton width: '{0}' height: '{1}'",
  btnStart.ScreenRectangle.Size.Width,
  btnStart.ScreenRectangle.Size.Height ) );
Output:

Code: Select all

Win-Startbutton width: '54' height: '40'
by hs.fk
Thu Feb 28, 2013 1:28 pm
Forum: Automation API
Topic: Ranorex.Screenshot();
Replies: 7
Views: 3761

Re: Ranorex.Screenshot();

I think you probably encounter this bug:

XmlLogger.LogData produces no output : Bug Reports
by hs.fk
Thu Feb 28, 2013 1:19 pm
Forum: Automation API
Topic: Excel error
Replies: 6
Views: 5340

Re: Excel error

I don't think Ciege means the using-directive, but a entry in the project settings, which adds a reference to the Microsoft.Office.Interop.Excel-Assembly (.dll)

How to: Add and Remove References in Visual Studio (C#, J#)
by hs.fk
Fri Feb 22, 2013 2:55 pm
Forum: Automation API
Topic: Validation of screenshot on screen
Replies: 2
Views: 2539

Re: Validation of screenshot on screen

Hi, Just wondering is it possible to verify in code whether a snapshot is currently being displayed on screen? You can use 'Host.Local' as an element that contains everything for 'Imaging.Contains' or 'Validate.ContainsImage'. using ( var img = Ranorex.Imaging.Load( @"D:\Unbenannt.PNG" ) ) { bool co...
by hs.fk
Fri Feb 15, 2013 12:31 pm
Forum: Bug Reports
Topic: XmlLogger.LogData produces no output
Replies: 3
Views: 2435

Re: XmlLogger.LogData produces no output

Hi,

thank you for the response.
Is there a public Bug-/Issue-Tracker available or is this subforum the only "place" for bugreports?

Regards,
fk
by hs.fk
Thu Feb 14, 2013 2:17 pm
Forum: Bug Reports
Topic: XmlLogger.LogData produces no output
Replies: 3
Views: 2435

XmlLogger.LogData produces no output

Hi, I encountered a problem by using "Ranorex.Report.LogData" with "System.Drawing.Bitmap" and a attached "Ranorex.Core.XmlLogger". The call to "XmlLogger.LogData" produces a NullPointerException, because this line in "XmlLogger.LogData.SaveScreenshot" (same for "SaveSnapshot") ReportEnvironment rep...