Page 1 of 1

ranorex spy very slow when dectect optionTag

Posted: Tue Jul 06, 2010 4:14 am
by hobli
With ranorex 2.3.2, when detect optionTag under a selectTag with IE, ranorexSpy becomes very slow, like hanging.

Please reproduce with the following html code:

Code: Select all

<select name="listbox" id="SelectSimple" size="4"  multiple=true>
    <option value="1">item 1</option>
    <option value="2" >item 2</option>
    <option value="4">item 4</option>
	<option value="0" selected>All</option>
	<option value="3" selected>  item 3  sdfasfdasdf asdf asd fasfdasd asd    </option>    
</select>
Steps:
1 enable ranorex plugin for IE
2 launch IE with the above code html
3 launch ranorex spy, enable "Track" with mouse click from spy
4 click on different option items
Ranorex Spy hangs

When disable ranorex plugin for IE, it is working properly.

Re: ranorex spy very slow when dectect optionTag

Posted: Tue Jul 06, 2010 8:54 am
by Support Team
Hi,

I tried to reproduce your behavior without success. I tracked the option tags with SPY in IE7,IE8 and FF 3.6.6, but SPY doesn't hang after tacking the elements.
Please can you post me some additional information.
  • Which bit-platform you are using? x86 or x64
  • Are you tracking the element or you are using "Track and Drop" the element?
Thanks in advance

Regards,
Peter
Ranorex Support Team

Re: ranorex spy very slow when dectect optionTag

Posted: Thu Jul 08, 2010 1:35 am
by hobli
Hi,

I have tried again. Here's more details:

Ranorex: 2.3.2.8802
Platform: x86, winxpSP3
IE 7.0

1 open IE, and enable the Ranorex plugin
2. restart IE with the web page (attached)
3. launch ranorex spy
4. press "ctrl+win" to detect simple list box (with item1, item2, ... All inside, named 'listboxA')
5. mouse click on each child element in ranorex spy element tree, notice ranorex spy is working properly
6. press "ctrl+win" to detect list box with option group next to simple list box (with Group Label, item1, item2... inside, named 'listboxB')
7. press "ctrl+win" to detect individual option/option group tag under the list box, notice Ranorex Spy fail to detect individual options. (it was working in Ranorex 2.3.1)
8. expand the listbox with group options in ranorex spy element tree, notice all option group tags are marked as 'invisible', this is wrong.
9. mouse click on each child element in ranorex spy element tree, notice sometimes, the spy is slow, but still acceptable
10. mouse click on each child element in ranorex spy element tree of the simple list box (listboxA), the spy hangs
11. force to close IE and the spy, restart IE and spy
12. press "ctrl+win" to detect listboxA again, mousclick on child element, the spy will hang immediatly.

Code: Select all

<html>
<head><title>tt</title></head>
<body>
<DL>
	 <DT><I>term name 1</I>
	 <DD><I>term definition</I>
	 <DT><I>term name 2</I>
	 <DD><I>term definition</I>
	 <DT><I>term name 3</I>
	 <DD><I>term definition</I>
</DL>

<OL id='olid' type='' title='ol title' >
	 <LI >first list item</LI>
	 <LI >second list item</LI>
	 <ol>
	 <LI >first list item</LI>
	 <ol>
	 <LI >first list item</LI>
	 <LI >second list item</LI>
	 </ol>
	 <LI >second list item</LI>
	 </ol>
	 <LI >third list item</LI>
</OL>
<UL id='ulid'  type="" title='ul title'>
<LI >first ul item</LI>
<UL >
<li >sub item1</li>
<li >sub item2</li>
</UL>
<LI>second ul item</LI>
</UL>
following is a kbd msg kkkkkk<kbd>kkkkkk</kbd>kkkkkk followed with normal msg
<input type='' maxlength=10 title="psw title" name="psw name" value="" id="unknown" readonly=1>
<input type=password maxlength=10 title="psw title" name="psw name" value="" id="pswID" >
<input type=text title="input editbox title" name="input editbox name" value="input editbox value" id="editboxID">
<br>
<textarea rows=4 title="text area title" name="text area name" value="text area value" id="editboxArea">default line1&#13;&#10;default line 2</textarea>
<br>
<input type=Button title="button title" name="button name" value="value">

<select name=comboBox title="combo Title" size="1">
<option value='string a'>string a</option>
<option value='string b'>string b</option>
<option selected value='string c' >string ccadfsd fsadfasfqf fsaf wd asfd fw fasd </option>
</select>
<select myattri='cool' name="listbox" id="SelectSimple" size="4"  multiple=true>
    <option value="1">item 1</option>
    <option value="2" >item 2</option>
    <option value="4">item 4</option>
	<option value="0" selected>All</option>
	<option value="3" >  item 3  sdfasfdasdf asdf asd fasfdasd asd    </option>    
</select>
<select myattri='cool' name="listbox" id="Select1" size="4"  multiple>
<optgroup label="group 1 label">
    <option value="1">item 1</option>
    <option value="2" >item 2</option>
</optgroup>
<optgroup label="group 2 label">
    <option value="4">item 4</option>
	<option value="3" selected>  item 3  sdfasfdasdf asdf asd fasfdasd asd    </option>    
</optgroup>	
<option value="0">All</option>
</select>
<br>
<input type="radio" name="radioBtn Name" value="radio 1" id="radio1ID" />
<label for="radio1ID">radio 1</label>
<input type="radio" name="radioBtn Name" value="radio 2" id="radio2ID"/>
<label>radio 2</label>

<br>
<label for="chkbox1ID">checkbox 1 label</label>
<input type="checkbox" name="chkbox name"  value="chkbox 1 value" id="chkbox1ID" title="chkbox Title"/>
<label for="sdf">correct label</label>
<br>
<img id="imgid" title="img title" src="ie.gif" alt="alternative text" border=50 >
<a id='linkid'  href="http://www.google.com" target="myFrame">test link</a><img id="imgThin" title="img thin title" src="firefox.gif" alt="thin img alternative text" width=200 height=100>
<a id='linkbm' href="http://www.google.com.sg">bookmark link</a>
<br>
<p title='p title' id='pid'>complex text <br>bl
ock<b> b </b><i> i <b> ib </b> i </i><x>xxxx</x> lalall</p>
<h2 id='h2id'>header level 2</h2>
<table id='tableID' border="1">
<caption>table title</caption>
  <thead>
    <tr>
      <th>Month</th>
      <th>Savings</th>
    </tr>
  </thead>
  <tfoot>  
    <tr>
      <th>Sum</th>
      <th>$180</th>
    </tr>
  </tfoot>
  <tbody>
    <tr>
      <td>Ja;nuar\y</td>
      <td>$|100</td>
	  <td>ex\\||tra td</td>
    </tr>
    <tr>
      <td>February</td>
      <td>$8;0</td>
    </tr>
  </tbody>
  
</table>
</body>
</html>

Re: ranorex spy very slow when dectect optionTag

Posted: Thu Jul 08, 2010 9:45 am
by Support Team
Hi,

I followed your steps, but I can't reproduce your "hang" behavior of SPY. Could it be possible that Ranorex Studio with Element Browser is open too? This would be a possible cause that SPY hangs, because they block each other for a short time.
hobli wrote:notice all option group tags are marked as 'invisible'
Sorry, but "OptGroup" at the moment is only supported for Firefox. We know about that issue in Internet Explorer, but cannot do much about it, since IE does convey any information about such tags. However, we try to fix this issue in a future release of Ranorex.

Regards,
Peter
Ranorex Support Team

Re: ranorex spy very slow when dectect optionTag

Posted: Fri Jul 09, 2010 2:45 am
by hobli
Hi,

I did not open studio at all.
I tried with IE8, still encounter this problem. But I notice when I enable ranorex spy "always on top", ranorex spy won't hang, however, if I disable ranorex spy "always on top", with the steps in my earlier post, it will hang.

Please double check.

thanks

Re: ranorex spy very slow when dectect optionTag

Posted: Fri Jul 09, 2010 9:37 am
by Support Team
Hi,

I tried each constellation which is possible with Spy, but I was not able to reproduce your error.
Sorry, but it seems this happens only on your computer. Could it be possible that some other process blocks the computer? How much percentage of you CPU is used when you track an item?

Regards,
Peter
Ranorex Support Team

Re: ranorex spy very slow when dectect optionTag

Posted: Wed Sep 15, 2010 2:41 am
by BethLange
I am also seeing this behavior.

Windows 7, x64
IE8
Ranorex 2.3.4
Visual Studio 2010 Ultimate with .NET Framework 3.5
AUT written in ASPX on the .NET 2.0 framework using CSS.

It takes 14 minutes for Spy to respond when I either try to expand the Select element or when I type in the path to the option.

When I attempt to detect in my code whether the control is available or grayed out, it always detects it as enabled. I can even pull the "innertext" property which is invisible to Spy.

Keyword code follows:
Private Function RWA_Delegate_Role_Select(ByVal oRow() As String) As Integer
        Dim iRetVal As Integer
        Dim role, tempString As String

        logs.LE("START " & oRow(DR_KEYWORD) & " to select the specified role for the delegate", 2)

        Try
            If Not ControlExists(RWAViewBase & "/div[2]/div[2]/select[@id='cmbRole']", True) Then
                logs.LE("The selection combo box does not exist", 2)
                logs.LE("END " & oRow(DR_KEYWORD) & " to select the specified role for the delegate", 2)
                incVerify(1)    'check pre-req
                Return DR_DISPATCH_FAIL
            Else
                Dim optItem As Ranorex.OptionTag = RWAViewBase & "/div[2]/div[2]/select[@id='cmbRole']/option[2]"
                tempString = optItem.Item("innertext")
                'if Not optItem.Valid Then
                If tempString.Equals(String.Empty) Then
                    logs.LE("The role selection combo box is not enabled", 2)
                    logs.LE("END " & oRow(DR_KEYWORD) & " to select the specified role for the delegate", 2)
                    incVerify(1)    'check pre-req
                    Return DR_DISPATCH_FAIL
                End If
                incVerify(1)    'check pre-req
            End If
            incVerify(1)    'check pre-req

            role = chkParam(oRow(DR_PARM_001))

            Dim cmbSelect As Ranorex.SelectTag = RWAViewBase & "/div[2]/div[2]/select[@id='cmbRole']"
            cmbSelect.Click(Location.Center)
            Dim selRole As Ranorex.ListItem = "/container[@caption='selectbox']/listitem[@accessiblename='" & role & "']"
            selRole.Click()
            incTest(1)  'select specified role

            cmbSelect = RWAViewBase & "/div[2]/div[2]/select[@id='cmbRole']"
            tempString = cmbSelect.Item("tagvalue")
            If tempString.ToUpper.Equals(role.ToUpper) Then
                logs.LE("Selected the specified role from the combo box:  " & role, 1)
                iRetVal = DR_DISPATCH_PASS
            Else
                logs.LE("Did not select the specified role from the combo box", 2)
                logs.LE("Expected:  " & role, 2)
                logs.LE("Actual:  " & tempString, 2)
                iRetVal = DR_DISPATCH_FAIL
            End If
            incVerify(1)    'check results

        Catch ex As Exception
            logs.LE("Problem attempting to select Delegate role:  " & vbCrLf & vbTab & _
                ex.Message(), 2)
            iRetVal = DR_DISPATCH_FAIL
        End Try
        incVerify(1)    'check for exception

        'check for planned failure and change result accordingly - leave if other than pass or fail
        If Left(oRow(DR_COMMENT), 15).ToUpper = "PLANNED FAILURE" Then
            If iRetVal = DR_DISPATCH_FAIL Then
                logs.LE("Planned failure did fail, changing to pass", 2)
                iRetVal = DR_DISPATCH_PASS
            ElseIf iRetVal = DR_DISPATCH_PASS Then
                logs.LE("Planned failure passed, changing to fail", 2)
                iRetVal = DR_DISPATCH_FAIL
            End If
        End If

        logs.LE("END " & oRow(DR_KEYWORD) & " to select the specified role for the delegate", 2)

        Return iRetVal

    End Function
I attempt to take a Ranorex snapshot but is again hung. I have screenshots (paint, .jpg) of the AUT with the control disabled and Spy once it has finally resolved the control.

Re: ranorex spy very slow when dectect optionTag

Posted: Thu Sep 16, 2010 12:28 pm
by Support Team
Hi,

Sorry but we are not able to reproduce it. Why is your path invalid in Spy? Could you check you CPU Load and post us a statistic, when this error occurs. Could be also possible that some kind of Anti Virus is enabled an blocks Spy to track the elements?

Regards,
Peter
Ranorex Team

Re: ranorex spy very slow when dectect optionTag

Posted: Thu Sep 16, 2010 2:06 pm
by BethLange
There is no anti-virus. Spy has no trouble tracking any other type of object in the application, so far.

The ONLY CPU load is Ranorex and the application. It is a dual proc monster machine (I'm currently at home so don't have the exact specs available).

I know the AUT and Spy lock up at the same time. Once it finally "resolves" the path in Spy, the application becomes available again.

I have tried walking through the objects (combo box and "tree" items - serious of nested div objects) in the Visual Studio debugger while running the automation and can find nothing to differentiate when the controls are grayed out versus when they are enabled - unless I try to select a list item which then causes an exception.