Q7

Q7 should support checkbox tables and record correct select commands.

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.2.0
  • Fix Version/s: 1.2.23, 1.3.6
  • Component/s: Recording
  • Labels:
  • Test Mode:
    Q7

Description

Right now if we have checkbox table all get-item commands will be recorded by indexes, since first column value is always empty string ("").

get-item "" -index 2 | check

We need to improve behaviour and record by second row in such case.

Issue Links

Activity

Hide
Stanislav Belyakov added a comment - 13/Aug/13 1:25 PM

Fixed forced -column parameter adding while recording.

Show
Stanislav Belyakov added a comment - 13/Aug/13 1:25 PM Fixed forced -column parameter adding while recording.
Hide
Ulyana Skorokhodova added a comment - 13/Aug/13 12:20 PM

1) "-column" is recorded with "set-caret-pos":

with [get-editor "Class1.java" | get-text-viewer] {
    set-caret-pos 2 -column 12
    key-type "M1+o"
    hover-text 2 -column 10 -with M1
}

but was:

with [get-editor \"Class1.java\" | get-text-viewer] {
   set-caret-pos 2 12
   key-type "M1+o"
   hover-text 2 10 -with M1
 }

2) CheckBoxCellEditors are wrongly recorded when there are no empty columns (see the attached screenshot):

select Name
get-cell 0 -column 1 | check

but should be:

select Name
get-cell 0 1 | check
Show
Ulyana Skorokhodova added a comment - 13/Aug/13 12:20 PM 1) "-column" is recorded with "set-caret-pos":
with [get-editor "Class1.java" | get-text-viewer] {
    set-caret-pos 2 -column 12
    key-type "M1+o"
    hover-text 2 -column 10 -with M1
}
but was:
with [get-editor \"Class1.java\" | get-text-viewer] {
   set-caret-pos 2 12
   key-type "M1+o"
   hover-text 2 10 -with M1
 }
2) CheckBoxCellEditors are wrongly recorded when there are no empty columns (see the attached screenshot):
select Name
get-cell 0 -column 1 | check
but should be:
select Name
get-cell 0 1 | check
Hide
komaz added a comment - 12/Aug/13 11:58 AM

Ulyana, could you please make recording tests and make sure old behavior is not broken?

Show
komaz added a comment - 12/Aug/13 11:58 AM Ulyana, could you please make recording tests and make sure old behavior is not broken?
Hide
Stanislav Belyakov added a comment - 12/Aug/13 11:44 AM

Added support for -column argument in 'get-item' and 'select' commands.

Show
Stanislav Belyakov added a comment - 12/Aug/13 11:44 AM Added support for -column argument in 'get-item' and 'select' commands.
Hide
komaz added a comment - 17/Jul/13 4:21 PM
Show
komaz added a comment - 17/Jul/13 4:21 PM http://support.xored.com/helpdesk/tickets/403
Hide
komaz added a comment - 15/May/13 4:21 PM
Show
komaz added a comment - 15/May/13 4:21 PM http://support.xored.com/helpdesk/tickets/270
Hide
vyacheslav.ogai added a comment - 01/Apr/13 10:06 AM - edited

I have started resolving this problem but have to stop for a while.
I have found that get-item command may uses in 2 variants: in cooperation with select comand and standalone. This two cases have different implementation(not completly).
For now I want to describe workflow of {{select [get-item -path "" -index 2]}} command in current implementation.

  1. SelectorService.service() is the initial point of the get-item command workflow which I have investigated. SelectorService.service() configures ControlHandler object for further using.
  2. Then execution thread reaches ActionService.handleSelect(). Method handleSelect converts a list of ControlHandlers for current Select comand to a list of paths.
  3. Then ActionService.getViewerUIElement() method returns ViewerUIElement for necessary control.
  4. ViewerUIElement.setMultiselectionList generates UISetSelector and fills it with necessary information for further selection processes and call UISetSelector.select() method.
  5. In UISetSelector.select() generates SetSelection comand and executes it in current player( Response executeCommand = (Response) player.safeExecuteCommand(SetSelection comand) ).
  6. player.safeExecuteCommand sends (somehow) SetSelection command to SWTUIProcessor. SWTUIProcessor handles it in SWTUIProcessor.handleSetSelection() method.
  7. SWTUIProcessor.handleSetSelection() generates SWTUIElement for actual searching elements in UI. SWTUIElement.setSelection() method delegates searching UI element to Viewers class.
  8. Viewers class has two methods which actual search UI element by specified rules. This is findTableItems method and findTreeItems (depends on table implementation).

So, the idea is to pass -columnName parameter through all that stack calls from point 1 to point 8 and then modify selection process.

Show
vyacheslav.ogai added a comment - 01/Apr/13 10:06 AM - edited I have started resolving this problem but have to stop for a while. I have found that get-item command may uses in 2 variants: in cooperation with select comand and standalone. This two cases have different implementation(not completly). For now I want to describe workflow of {{select [get-item -path "" -index 2]}} command in current implementation.
  1. SelectorService.service() is the initial point of the get-item command workflow which I have investigated. SelectorService.service() configures ControlHandler object for further using.
  2. Then execution thread reaches ActionService.handleSelect(). Method handleSelect converts a list of ControlHandlers for current Select comand to a list of paths.
  3. Then ActionService.getViewerUIElement() method returns ViewerUIElement for necessary control.
  4. ViewerUIElement.setMultiselectionList generates UISetSelector and fills it with necessary information for further selection processes and call UISetSelector.select() method.
  5. In UISetSelector.select() generates SetSelection comand and executes it in current player( Response executeCommand = (Response) player.safeExecuteCommand(SetSelection comand) ).
  6. player.safeExecuteCommand sends (somehow) SetSelection command to SWTUIProcessor. SWTUIProcessor handles it in SWTUIProcessor.handleSetSelection() method.
  7. SWTUIProcessor.handleSetSelection() generates SWTUIElement for actual searching elements in UI. SWTUIElement.setSelection() method delegates searching UI element to Viewers class.
  8. Viewers class has two methods which actual search UI element by specified rules. This is findTableItems method and findTreeItems (depends on table implementation).
So, the idea is to pass -columnName parameter through all that stack calls from point 1 to point 8 and then modify selection process.
Hide
komaz added a comment - 12/Mar/13 9:55 AM

Simlpe using of a second column if first column is all empty seems too fragile to me, as after some modifications in AUT things may change and the first column is not all empty anymore.

I think we should do the following:

  • add support for -column argument in 'get-item' and 'select' commands
  • use second (third etc) column during recording if all values are empty and specify the name of used column in an argument.
Show
komaz added a comment - 12/Mar/13 9:55 AM Simlpe using of a second column if first column is all empty seems too fragile to me, as after some modifications in AUT things may change and the first column is not all empty anymore. I think we should do the following:
  • add support for -column argument in 'get-item' and 'select' commands
  • use second (third etc) column during recording if all values are empty and specify the name of used column in an argument.

People

Vote (0)
Watch (0)

Dates

  • Created:
    11/Mar/13 8:59 AM
    Updated:
    13/Aug/13 1:25 PM
    Resolved:
    13/Aug/13 1:25 PM