Re: Querying top panel widget positions?




Hello Chris,

there is V-language and there is
UI testing too - however this is all very New
and there UI Looks at moment a bit Like
in Apple OS.

No offense.
Greetz.
Charly.

ken <mait newcultures com> schrieb am So., 21. März 2021, 11:45:
On March 21, 2021 1:27:20 AM UTC, Chris Spencer via gnome-list <gnome-list gnome org> wrote:
Hi,

Is there any way to programmatically lookup the position of widgets displayed in the Gnome top panel, as well as UI elements within those widgets?

I'm trying to build a UI test automation framework for some Gnome Shell panel widgets. I'd like to write a script that can click on a panel widget, confirm a popup appears, verify certain text exists in the popup, etc.

I maintain a Gnome Shell extension, and it's become immensely expensive, not to develop, but to test and maintain. There are so many different distros with varying incompatible Gnome versions, and testing them all by hand is virtually impossible. Fixing a bug for one Gnome version introduces a bug in another version. It's gotten to the point where I almost have to abandon the project because it's too difficult to do basic integration and regression testing on Gnome, but I really want to find a solution.

Gnome is one of the most widely used desktop environments in the world, so I find it hard to believe no one else has encountered this problem befpre.

I've found some tools like xdotool and pyautogui for programmatically clicking elements. However, without knowing exactly where widgets are rendered, the script would be clicking blind. And even if I could reliably click a location, those tools don't let me read DOM values for the UI elements at that location.

I've also found some tools like xwininfo that can query some window positions and do a little introspection, but this seems specific to X and treats the entire top panel as one huge window, with no ability to introspect any of the widgets inside of it.

I had hoped the Dogtail project might be helpful in this regard, but it seems to be dead  with virtually no documentation. I was able to build it, but I couldn't find any ability within it to introspect the top panel.


Are there any other tools or libraries I could potentially use? Does anyone have any alternate suggestions for how I might automate Gnome UI testing?

Regards,
Chris

Chris, I might be talking way over my head, and I haven't had my first cup of coffee yet, but speaking just with a little programming experience behind me, I'm guessing that there must be a shared library or two which has the code that creates the widgets which are displayed in the top panel. Some code could be added to that Library which logs that particular event when the widget is created in the top panel, or moved within that top panel, or deleted from it. That logging ability would not need to be existent in that shared library for the whole distro, you just need to have it on your own machine for its testbed environment.

I hope this little project turns out to be a lot more fun than I've made it sound. :)
_______________________________________________
gnome-list mailing list
gnome-list gnome org
https://mail.gnome.org/mailman/listinfo/gnome-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]