Week 11 Report

This week:

1) I have worked in solving the problem of un-named parent :
For example, if I open calc and select any cell you will find a field in the upper tab that has the name of the cell for example C10. If I tried to type another name in this I will get this log statement:

>>Type on 'pos_window' {"TEXT": "a"} from

This means that the 'pos_window' edit UI object has a parent with no name. So how to solve it and how to generate a UI test Case that corresponds to this action as I know I should convert it to something like this:

pos_window = [Parent_Name].getChild("pos_window")
pos_window.executeAction("TYPE", mkPropertyValues({"TEXT": "a"}))

This problem happens in many unexpected places and it makes the compiler stuck in running and not convert the logger to a UI test.

The easiest fix is to change the logger to recursively query the parent until you find an element with a name. Usually, that should work. IF you reach the top level and still have no parent, for the time being, we can assume that we can just use the top-level UI element.

I tried to make this but I found that the un-named parent has also a un-named parent and if I try to make a recursive loop it enters an infinite loop and the app crashed. Then I find that some of the un-named parent objects still have un-named parent after using this function:
https://opengrok.libreoffice.org/xref/core/vcl/source/uitest/uiobject.cxx?r=76806232#109

So try to find a solution that has a way to say that it is the current top-level parent. That does not mean the main window as there are quite a few dialogs that are not in the main window hierarchy. So I assume that only the parent can be a dialog so I modify the dsl_logger with these modifications:
  • Add recursively query for the parent until finding a parent with a name
    • This can be found in these functions
      vcl::Window* get_top_parent(vcl::Window* window)
      in the logger.cxx file
  • Remove the parent part "from xxxxxx" from the log statement if there is a un-named parent
  • Update the compiler to use the most top parent if there is command with no un-named parent:
    • This can be done in the dsl_core.py file with the file last_parent array that saves all the dialog in a hierarchy way to be able to get the top of them by access the array with the parent_hiraricy_count variable.


Then I test the new approach with many cases and it works efficiently the only problem if we have a dialog that has no name.

all this work can found here in this commit:
https://gerrit.libreoffice.org/#/c/77231/


2) Raal start to test the new logger with many test cases to be able to merge into the master in the future.

3) add missing footer line here: https://gerrit.libreoffice.org/#/c/77429/

Next week:
It will be the last week in the program so I will try to make good documentation for the project to be able to extend in the future and to describe all the used technologies in the project.

Comments

Popular posts from this blog

Week 3 Report

Week 1 Report

Week 6 Report