Re: Querying top panel widget positions?

Carl-Valentin Schmitt via gnome-list <[email protected]> Sun, 21 Mar 2021 13:00:42 +0100
Newsgroups gmane.comp.gnome.general
Message-ID <CADSQJP6atz=22hMKJh9q+yqwQLcxbCfZzwHa=sNuFOpWxZzxSQ@mail.gmail.com>
--===============7666471744464313160==
Content-Type: multipart/alternative; boundary="00000000000087301305be0ab3b4"

--00000000000087301305be0ab3b4
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

> 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 <[email protected]> schrieb am So., 21. M=C3=A4rz 2021, 11:45:
>
>> On March 21, 2021 1:27:20 AM UTC, Chris Spencer via gnome-list <
>> [email protected]> 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 wid=
get,
>>> 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 introd=
uces
>>> 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 relia=
bly
>>> 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 a=
nd
>>> 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 experienc=
e
>> 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 pan=
el.
>> Some code could be added to that Library which logs that particular even=
t
>> 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 h=
ave
>> 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
>> [email protected]
>> https://mail.gnome.org/mailman/listinfo/gnome-list
>>
>

--00000000000087301305be0ab3b4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D=
"gmail_attr"><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"auto">Hel=
lo Chris,<div dir=3D"auto"><br></div><div dir=3D"auto">there is V-language =
and there is</div><div dir=3D"auto">UI testing too - however this is all ve=
ry New</div><div dir=3D"auto">and there UI Looks at moment a bit Like</div>=
<div dir=3D"auto">in Apple OS.</div><div dir=3D"auto"><br></div><div dir=3D=
"auto">No offense.</div><div dir=3D"auto">Greetz.</div><div dir=3D"auto">Ch=
arly.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"g=
mail_attr">ken &lt;<a href=3D"mailto:[email protected]" target=3D"_blank=
" rel=3D"noreferrer">[email protected]</a>&gt; schrieb am So., 21. M=C3=
=A4rz 2021, 11:45:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class=
=3D"gmail_quote">On March 21, 2021 1:27:20 AM UTC, Chris Spencer via gnome-=
list &lt;<a href=3D"mailto:[email protected]" rel=3D"noreferrer noreferr=
er" target=3D"_blank">[email protected]</a>&gt; wrote:<blockquote class=
=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">
<div>Hi,<br></div><div><br></div><div>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?<br></div><div><br></div><div>I&#39;m try=
ing to build a UI test automation framework for some Gnome Shell panel widg=
ets. I&#39;d like to write a script that can click on a panel widget, confi=
rm a popup appears, verify certain text exists in the popup, etc.<br></div>=
<div><br></div><div>I maintain a Gnome Shell extension, and it&#39;s become=
 immensely expensive, not to develop, but to test and maintain. There are s=
o many different distros with varying incompatible Gnome versions, and test=
ing them all by hand is virtually impossible. Fixing a bug for one Gnome ve=
rsion introduces a bug in another version. It&#39;s gotten to the point whe=
re I almost have to abandon the project because it&#39;s too difficult to d=
o basic integration and regression testing on Gnome, but I really want to f=
ind a solution.<br></div><div><br></div><div>Gnome is one of the most widel=
y used desktop environments in the world, so I find it hard to believe no o=
ne else has encountered this problem befpre.</div><div><br></div><div>I&#39=
;ve found some tools like=C2=A0xdotool and=C2=A0pyautogui for programmatica=
lly clicking elements. However, without knowing exactly where widgets are r=
endered, the script would be clicking blind. And even if I could reliably c=
lick a location, those tools don&#39;t let me read DOM values for the UI el=
ements at that location.<br></div><div><br></div><div>I&#39;ve also found s=
ome tools like=C2=A0xwininfo that can query some window positions and do a =
little introspection, but this seems specific to X and treats the entire to=
p panel as one huge window, with no ability to introspect any of the widget=
s inside of it.<br></div><div><br></div><div>I had hoped the Dogtail projec=
t might be helpful in this regard, but it seems to be dead =C2=A0with virtu=
ally no documentation. I was able to build it, but I couldn&#39;t find any =
ability within it to introspect the top panel.<br></div><div><div></div><di=
v><br></div></div><div><br></div><div>Are there any other tools or librarie=
s I could potentially use? Does anyone have any alternate suggestions for h=
ow I might automate Gnome UI testing?<br></div><div><br></div><div>Regards,=
<br></div><div>Chris</div></blockquote></div><br clear=3D"all">Chris, I mig=
ht be talking way over my head, and I haven&#39;t had my first cup of coffe=
e yet, but speaking just with a little programming experience behind me, I&=
#39;m guessing that there must be a shared library or two which has the cod=
e 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 wi=
dget is created in the top panel, or moved within that top panel, or delete=
d from it. That logging ability would not need to be existent in that share=
d library for the whole distro, you just need to have it on your own machin=
e for its testbed environment.<br><br>I hope this little project turns out =
to be a lot more fun than I&#39;ve made it sound. :)</div>_________________=
______________________________<br>
gnome-list mailing list<br>
<a href=3D"mailto:[email protected]" rel=3D"noreferrer noreferrer" targe=
t=3D"_blank">[email protected]</a><br>
<a href=3D"https://mail.gnome.org/mailman/listinfo/gnome-list" rel=3D"noref=
errer noreferrer noreferrer" target=3D"_blank">https://mail.gnome.org/mailm=
an/listinfo/gnome-list</a><br>
</blockquote></div>
</blockquote></div></div></div>

--00000000000087301305be0ab3b4--

--===============7666471744464313160==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
gnome-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-list

--===============7666471744464313160==--