Skip to content

Replies

0
Michael Germann
Michael Germann answered on Apr 19, 2011 5:00 PM

There are two possibilities. You can use GetColumnContent(sColName or iColIndex), which will get you all the values for that particular column.

Or you can use GetNAProperty(sPropertyPath)

Something like the following:

Set ListView = SwfWindow("Form1").SwfListView("ultraListView1")
msgbox ListView.GetNAProperty("Items[1].SubItems[0].Text")

0
Michael Germann
Michael Germann answered on Apr 19, 2011 3:02 PM

I am not entirely sure why myself. I would be curious to know what version of TestAdvantage you were using, as well as the QTP version. My thought is, for some reason the int is being treated as an different datatype, int32, or something else. Perhaps it was an old bug, that was resolved, or something new in QTP11. Regardless though it should be resolvable by encapsulating the i parameter in a CSTR(i) function.

Let me know if it works,

0
Michael Germann
Michael Germann answered on Apr 14, 2011 8:51 PM

Hi Nooruddin,

    To be honest I am at a loss for why this issue is happening. My first thought is that there is something about the container control (SRDashSolution.PhoneManagementModule.OnePageView) or maybe your environment that may be causing this behavior. The container does appear to be a custom container in some manner. As to the environment I have seen other similar odd behaviors when our NetAdvantage WinForm controls are added to an ASP.NET page, I imagine same difference if it was added to a WPF or Silverlight environment. Not sure that is the case, but I would be curious if that is the scenario.

     I am curious, did you add the VScroll to the script because it wouldn't scroll into view on it's own? If not have you tried without the VScroll and without turning off the AutoScrollIntoView?

     A developer support case has been opened on this matter on your behalf. I would recommend them reviewing this in more detail with you, and if possible if you could provide them a sample of this behavior it would greatly help us in determining the cause of the behavior.

 

0
Michael Germann
Michael Germann answered on Apr 12, 2011 9:17 PM

Hi Nooruddin,

    What is the swftypename for the parent container that you are calling VScroll on? Also do you have the text of the script in question? Primarily I am looking to see what are the pertinent controls, the exact actions being performed and there swftypenames to properly build a sample that reproduces the behavior. Also I am looking to see if there are any actions that may seem innocuous but  may actually be causing the unexpected side effect that you are experiencing.

   As a side note, along with what Ammar was saying all of our controls, by default, automatically attempt to bring themselves into view during the calling of any of our custom actions. If for some reason because of the environment or other necessity we also offer the ability to turn this off. These are via proxy settings, settable globally on our controls via swfconfig.xml or during replay-time.

   There are actually two settings that may cause this effect the first, is CallPrepareForReplay, by default True, you may want to set this to false. What this setting does is turn on or of the calling of the QTP's internal PrepareForReplay method prior to completion the action. PrepareForReplay does several things, among of which are validating the existence of the object, and making it visible.

   The second is AutoScrollIntoView, by default True, you may want to set this to false. What this does is go up the parent tree of container controls that are scrollable, and in turn scroll each control in the link between the parent form and SourceControl into view.

  Neither of which should cause issues but as Scrolling seems to be the root of your problem, it may be worth testing the settings of each. You can view the current setting via :
SwfObject("SomeNAControl").GetProxySetting(sSettingName)

or set them via :

SwfObject("SomeNAControl").SetProxySetting sSettingName, oNewValue

eg. SwfObject("comboEditor1").SetProxySetting "CallPrepareForReplay", True

 

Again I don't think either of these settings are the cause, but it may be something to try in addition to supplying the information I requested earlier in this message.

0
Michael Germann
Michael Germann answered on Apr 8, 2011 2:26 PM

Hi,

     Is it not identifying the object when recording them, or is it recording fine, but not identifying the objects during replay? The way you question was phrased it could lean either way, but I am guessing it is more during replay.  Typically if an object not visible exception is thrown it leans towards the fact that while the object itself was found but the action requires UI interaction and the object  is not on the screen. All of our actions should by the best of their ability try to scroll the control into view. So that leaves two possibilities one, the action, may for some reason be missing the scroll into view call, or something else possibly in the application is keeping it hidden.

     Let's start off by testing my hypothesis about the object being found but just not visible. As of 10.3 all of our controls have at least three Get methods, GetNAProperty, GetNAProperties, GetProxySetting, these should not require the object to be visible to run. If any of these pass, then the object is found, the proxy is loaded and working correctly, it is just not visible. 

     Next let's assume that it maybe in the proxy, if so, what is the swftypename of the control\controls that
are having the problem, and what is are the action\actions that are
failing?

-Mike

 

0
Michael Germann
Michael Germann answered on Nov 2, 2010 3:52 PM

HI Harish,

    If the control is the UltraWinGrid, I believe I gave the general instructions for it and you even used it in the post following mine, so if that didn't answer the question, perhaps you can clarify it for me.  The method RowCount() which can be called on the grid, returns the row count for the data island of the active row. So if you activate a row then call RowCount() it will give you the some total of all the rows in that data island.

0
Michael Germann
Michael Germann answered on Oct 25, 2010 3:36 PM

Hi Harish,

You mention two somewhat conflicting statements, WPF and the UltraWinGrid. If you are using NetAdvantage for WPF, the grid you are likely using is the XamDataGrid, if so unfortunately at this time there is no support for that control for QuickTest Professional. We are looking to develop support for it, and more information on that can be found here: community.infragistics.com/forums/p/46649/250420.aspx#250420

If the control that you are using is the UltraWinGrid, then the toolset for that is NetAdvantage for WinForm controls, in which case you can use our corresponding version of TestAdvantage, which you can get the RowCount via the RowCount method. It returns either the base band’s row count, or if there is an active row, it will return the row count for the data island that the row is found on. Note that it is the data island and not the whole band. So if you expand a row, and activate a child row of it, and call row count, it will return the count of the rows directly under that parent row.

I hope this answers your question