richelbilderbeek / testing_cpp_gui_applications_tutorial

Tutorial about testing C++ GUI applications
GNU General Public License v3.0
3 stars 0 forks source link

Cannot detect geometry on local computer #9

Open richelbilderbeek opened 7 years ago

richelbilderbeek commented 7 years ago

All dialogs appear to have a geometry of 10x10 and are located at coordinat (10,10).

For example, from the Travis log

1.02s$ ./get_height_of_first_dialog_test
Xlib:  extension "RANDR" missing on display ":99.0".
OK: found a height of 10 of dialog with name 'Leafpad'
Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to activate the window was aborted.
xdo_window_activate on window:2097153 reported an error
The command "./get_height_of_first_dialog_test" exited with 0.

3.02s$ ./get_width_of_first_dialog_test
Xlib:  extension "RANDR" missing on display ":99.0".
OK: found a width of 10 of dialog with name 'Leafpad'
Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to activate the window was aborted.
xdo_window_activate on window:2097153 reported an error
The command "./get_width_of_first_dialog_test" exited with 0.

1.02s$ ./get_x_of_first_dialog_test
Xlib:  extension "RANDR" missing on display ":99.0".
OK: found an x of 20 of dialog with name 'Leafpad'
Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to activate the window was aborted.
xdo_window_activate on window:2097153 reported an error
The command "./get_x_of_first_dialog_test" exited with 0.

1.02s$ ./get_y_of_first_dialog_test
Xlib:  extension "RANDR" missing on display ":99.0".
OK: found a y of 20 of dialog with name 'Leafpad'
Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to activate the window was aborted.
xdo_window_activate on window:2097153 reported an error
richelbilderbeek commented 7 years ago

Perhaps setting a minimal size and position in the code changes this.

richelbilderbeek commented 7 years ago

Well, it does look bad on a local computer:

issue

richelbilderbeek commented 7 years ago

On Travis, this looks great however:

The command "./minimal_project_build" exited with 0.
7.10s$ ./minimal_project_test_complete

...

Starting the application
Applications after:
Window 0x200002:
  Machine:  testing-gce-8d0842e6-96a2-4c2b-a842-eb75f77cbe15
  Name:  Dialog
  Command:  ./minimal_project
  Instance/Class:  minimal_project/Minimal_project

...

OK: found an x of 604 of dialog with name 'minimal_project'
OK: found a y of 388 of dialog with name 'minimal_project'
OK: found a width of 400 of dialog with name 'minimal_project'
OK: found a height of 300 of dialog with name 'minimal_project'
richelbilderbeek commented 7 years ago

This is a problem: I need to be able to see the scripts working both locally and on Travis. How else can I trust the right thing happening on Travis?