Week 1 Report
This week I start implementation of the grammar of the new DSL language:
I add this project files in core/uitest/ui_logger_dsl/
The new DSL language consist of some commands with diffrent types:
1) UNOCommand
finished the commands that don't take parameters
2) StarterCommand
done
3) UIObjectCommand
this command logs all these objects actions:
- ButtonUIObject
- CheckBoxUIObject
- EditUIObject
- RadioButtonUIObject
- ListBoxUIObject
- ComboBoxUIObject
- SpinUIObject
- SpinFieldUIObject
- TabControlUIObject
4) DialogCommand
done
5) SpecialCommand
this command consist of any other action that related to special application like actions for writer as (set zoom - GOTO page)
I will work on this next week.
You can see example of expected logged file otput here : uitest/ui_logger_dsl/example.ul
as .ul mean uiLogger
also this example with the old logger will be like:
ButtonUIObject Action:CLICK Id:writer_all Parent:
CommandSent Name:.uno:UpdateInputFields
CommandSent Name:.uno:FontDialog
ModalDialogExecuted Id:CharacterPropertiesDialog
Action on element: tabcontrol with action : 77
Action on element: westfontnamelb-cjk with action : 18
TabControlUIObject Action:SELECT Id:tabcontrol Parent:CharacterPropertiesDialog {"POS": "0"}
Action on element: tabcontrol with action : 77
TabControlUIObject Action:SELECT Id:tabcontrol Parent:CharacterPropertiesDialog {"POS": "2"}
RadioButtonUIObject Action:CLICK Id:90deg Parent:CharacterPropertiesDialog
Action on element: 90deg with action : CLICK
Action on element: 90deg with action : CLICK
ComboBoxUIObject Action:SELECT Id:weststylelb-cjk Parent:CharacterPropertiesDialog {"POS": "2"}
Action on element: weststylelb-cjk with action : 12
CheckBoxUIObject Action:CLICK Id:pairkerning Parent:CharacterPropertiesDialog
Action on element: pairkerning with action : CLICK
Action on element: pairkerning with action : CLICK
SpinFieldUIObject Action:UP Id:scalewidthsb Parent:CharacterPropertiesDialog
Action on element: scalewidthsb with action : 18
Action on element: scalewidthsb with action : 16
Action on element: scalewidthsb with action : TYPE
Action on element: scalewidthsb with action : 16
SpinFieldUIObject Action:UP Id:scalewidthsb Parent:CharacterPropertiesDialog
Action on element: scalewidthsb with action : 18
Action on element: scalewidthsb with action : 16
Action on element: scalewidthsb with action : TYPE
Action on element: scalewidthsb with action : 16
SpinFieldUIObject Action:DOWN Id:scalewidthsb Parent:CharacterPropertiesDialog
Action on element: scalewidthsb with action : 18
Action on element: scalewidthsb with action : 16
Action on element: scalewidthsb with action : TYPE
Action on element: scalewidthsb with action : 16
EditUIObject Action:TYPE Id:linewidthmf Parent:CharacterPropertiesDialog {"TEXT": "1"}
Action on element: linewidthmf with action : TYPE
Action on element: linewidthmf with action : 16
ListBoxUIObject Action:SELECT Id:effectslb Parent:CharacterPropertiesDialog {"POS": "2"}
Action on element: effectslb with action : 12
ButtonUIObject Action:CLICK Id:ok Parent:CharacterPropertiesDialog
DialogClosed
ModalDialogExecuted Id:QuerySaveDialog
ButtonUIObject Action:CLICK Id:discard Parent:QuerySaveDialog
DialogClosed
CommandSent Name:.uno:UpdateInputFields
CommandSent Name:.uno:FontDialog
ModalDialogExecuted Id:CharacterPropertiesDialog
Action on element: tabcontrol with action : 77
Action on element: westfontnamelb-cjk with action : 18
TabControlUIObject Action:SELECT Id:tabcontrol Parent:CharacterPropertiesDialog {"POS": "0"}
Action on element: tabcontrol with action : 77
TabControlUIObject Action:SELECT Id:tabcontrol Parent:CharacterPropertiesDialog {"POS": "2"}
RadioButtonUIObject Action:CLICK Id:90deg Parent:CharacterPropertiesDialog
Action on element: 90deg with action : CLICK
Action on element: 90deg with action : CLICK
ComboBoxUIObject Action:SELECT Id:weststylelb-cjk Parent:CharacterPropertiesDialog {"POS": "2"}
Action on element: weststylelb-cjk with action : 12
CheckBoxUIObject Action:CLICK Id:pairkerning Parent:CharacterPropertiesDialog
Action on element: pairkerning with action : CLICK
Action on element: pairkerning with action : CLICK
SpinFieldUIObject Action:UP Id:scalewidthsb Parent:CharacterPropertiesDialog
Action on element: scalewidthsb with action : 18
Action on element: scalewidthsb with action : 16
Action on element: scalewidthsb with action : TYPE
Action on element: scalewidthsb with action : 16
SpinFieldUIObject Action:UP Id:scalewidthsb Parent:CharacterPropertiesDialog
Action on element: scalewidthsb with action : 18
Action on element: scalewidthsb with action : 16
Action on element: scalewidthsb with action : TYPE
Action on element: scalewidthsb with action : 16
SpinFieldUIObject Action:DOWN Id:scalewidthsb Parent:CharacterPropertiesDialog
Action on element: scalewidthsb with action : 18
Action on element: scalewidthsb with action : 16
Action on element: scalewidthsb with action : TYPE
Action on element: scalewidthsb with action : 16
EditUIObject Action:TYPE Id:linewidthmf Parent:CharacterPropertiesDialog {"TEXT": "1"}
Action on element: linewidthmf with action : TYPE
Action on element: linewidthmf with action : 16
ListBoxUIObject Action:SELECT Id:effectslb Parent:CharacterPropertiesDialog {"POS": "2"}
Action on element: effectslb with action : 12
ButtonUIObject Action:CLICK Id:ok Parent:CharacterPropertiesDialog
DialogClosed
ModalDialogExecuted Id:QuerySaveDialog
ButtonUIObject Action:CLICK Id:discard Parent:QuerySaveDialog
DialogClosed
This has same output as you can find in the example.ul here
Start writer_all
Send UNO Command (".uno:UpdateInputFields")
Send UNO Command (".uno:FontDialog")
Open CharacterPropertiesDialog
choose Tab number 0 from CharacterPropertiesDialog
choose Tab number 2 from CharacterPropertiesDialog
select "90deg" Radio Button from CharacterPropertiesDialog
toggle "pairkerning" CheckBox from CharacterPropertiesDialog
select from "weststylelb-cjk" ComboBox iterm number 2 from CharacterPropertiesDialog
increase "scalewidthsb" from CharacterPropertiesDialog
increase "scalewidthsb" from CharacterPropertiesDialog
decrease "scalewidthsb" from CharacterPropertiesDialog
Type on "linewidthmf" {"TEXT": "1"} from CharacterPropertiesDialog
select element with position=2 from "effectslb" from CharacterPropertiesDialog
Click on "ok" from CharacterPropertiesDialog
Close Dialog
Open QuerySaveDialog
Click on "ok" from QuerySaveDialog
Close Dialog
Send UNO Command (".uno:UpdateInputFields")
Send UNO Command (".uno:FontDialog")
Open CharacterPropertiesDialog
choose Tab number 0 from CharacterPropertiesDialog
choose Tab number 2 from CharacterPropertiesDialog
select "90deg" Radio Button from CharacterPropertiesDialog
toggle "pairkerning" CheckBox from CharacterPropertiesDialog
select from "weststylelb-cjk" ComboBox iterm number 2 from CharacterPropertiesDialog
increase "scalewidthsb" from CharacterPropertiesDialog
increase "scalewidthsb" from CharacterPropertiesDialog
decrease "scalewidthsb" from CharacterPropertiesDialog
Type on "linewidthmf" {"TEXT": "1"} from CharacterPropertiesDialog
select element with position=2 from "effectslb" from CharacterPropertiesDialog
Click on "ok" from CharacterPropertiesDialog
Close Dialog
Open QuerySaveDialog
Click on "ok" from QuerySaveDialog
Close Dialog
Also TextX works with metamodels in python so you can run this grammer to check that it's right by this command :
>>python uitest/ui_logger_dsl/dsl_core.py
to see how the example file is handled and the command is understood well.
Also this image show the structure of the current grammar structure:
the patch that shows all these work can be found here
your comments is most welcomed.
Comments
Post a Comment