Contributions
how to get rownumber of currently visible rows?
Hi, I have a testcase the intent of which is to scrolls in increments through a Viewport objectwaiting after each scrolluntil the rows no longer display "Loading..." in the cells. There may be as many as 2+ million rows of data; the Viewport displays 16 rows at a time. For the first two scrolls this works as expected but after that it scrolls through the rest of the table without waiting even though rows all display "Loading..." still. I assume this is happening because getValueAt(0, 0) is trying to get the first rows of the table and after scrolling we no longer have access to them? My question is how can I get the rownumber of the first VISIBLE row in the table? Here's a snippet of code: Dim i Dim scrollIncr Dim rowValue set scrollBar = GDTablePanel.DefaultOverlayable.GTablePanel_4.VScroll 'get position at max scroll... scrollBarMax = scrollBar.Max 'set maxEntries log.Message("Max is " & scrollBarMax) '...and divide by 10 to get the positions to scroll to scrollSegment = scrollBarMax / 10 i = 0 For i = 1 To 10 scrollIncr = scrollSegment * i log.Message("Scrolling to " & scrollIncr) scrollBar.Pos = scrollIncr 'need to wait after each scroll until "Loading..." no longer displays in table whileGTablePanel_4.Viewport.Event_Log.getValueAt(0, 0).toString = "Loading..." aqUtils.Delay(10) Wend 'when "Loading..." no longer displays go on to next scroll action Next Thanks!17KViews0likes1Comment- 1.1KViews0likes0Comments
Re: VBScript and RegEx objects?
Nevermind, I just figured out how to get this working: Dim regEx Set regEx = New RegExp regEx.Pattern = "Total[\s\S] [\d.:]*" regEx.IgnoreCase = True Set Matches = regEx.Execute(searchResults) For Each Match in Matches log.Message("Results: " + Match.Value) Next I am still curous as to why the As syntax is not recognized in TestComplete however. Thanks1.1KViews0likes0CommentsVBScript and RegEx objects?
Hello, I'm trying to use regular expressions from vbscript using TestComplete 8.6. The following code snippet returns syntax error complainign about "As": Dim r As New Regex( "Total[\s\S][\d.:]*", _RegexOptions.IgnoreCase) When I try to do it this way: Dim r r = New Regex("Total[\s\S][\d.:]*", _RegexOptions.IgnoreCase) I get a syntax error complaining about "New" This syntax is from the MS vbscript language reference which is linked from the TestComplete help. How does one create a new RegEx object using VBScript in TestComplete? Thanks!22KViews0likes4Comments