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
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.
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 - 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
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
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.
Stanislav Belyakov made changes - 12/Aug/13 11:44 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
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?
Ulyana Skorokhodova made changes - 12/Aug/13 4:34 PM
Test Mode Manual Q7
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
Ulyana Skorokhodova made changes - 13/Aug/13 12:20 PM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Ulyana Skorokhodova made changes - 13/Aug/13 12:24 PM
Attachment CheckBoxCellEditor.jpg [ 14172 ]
Ulyana Skorokhodova made changes - 13/Aug/13 12:24 PM
Assignee Ulyana Skorokhodova [ ulik ] Stanislav Belyakov [ stanislav.belyakov ]
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.
Stanislav Belyakov made changes - 13/Aug/13 1:25 PM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]
Transition Time In Source Status Execution Times Last Executer Last Execution Date
Open Open In Progress In Progress
10d 2h 32m 1 vyacheslav.ogai 21/Mar/13 11:31 AM
In Progress In Progress Open Open
13d 14h 14m 1 komaz 04/Apr/13 2:45 AM
Open Open Resolved Resolved
130d 8h 58m 1 Stanislav Belyakov 12/Aug/13 11:44 AM
Resolved Resolved Reopened Reopened
1d 35m 1 Ulyana Skorokhodova 13/Aug/13 12:20 PM
Reopened Reopened Resolved Resolved
1h 5m 1 Stanislav Belyakov 13/Aug/13 1:25 PM

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