You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by "seba.wagner@gmail.com" <se...@gmail.com> on 2020/10/30 01:51:09 UTC

Selenium test and unique and predictable ID or class required for guest login OK button

Hi,

I want to write a selenium test that clicks away the Guest login modal
window.

See below image for a screenshot of the modal or click here:
https://snipboard.io/fLAHRk.jpg

But the "OK" button in that modal has a changing ID on every reload.
And it has a very generic selector, for example I tried with "#contents
.btn.btn-outline-primary"

But using Selenium it finds too many matches for this selector:
Running command: waitForElementVisible ('#contents
.btn.btn-outline-primary', 20000)

Warning: More than one element (19) found for element <#contents
.btn.btn-outline-primary> with selector: "#contents
.btn.btn-outline-primary". Only the first one will be used.

=> There are obviously too many of those OK buttons. So it's impossible to
click this modal away.

Is there a way to set a CSS class or ID that is unique (and *predictable*!)
so this guest popup can be clicked away via Selenium ?

Thanks
Seb

Guest popup login:
[image: image.png]


Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
I was able to make it work

It is strange, but in Selenium it seems if the video was present on browser
start, it doesn't playback. Not sure why. But if you then restart the video
during the session it displays fine.

Thanks,
Seb

Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>


On Mon, 2 Nov 2020 at 16:45, Maxim Solodovnik <so...@gmail.com> wrote:

> I would recommend to try to start chrome with custom flags :)
>
> On Sun, 1 Nov 2020 at 13:27, seba.wagner@gmail.com <se...@gmail.com>
> wrote:
>
> > yeah like I say: I solved that issue (see my PR).
> >
> > But even though confirming the permissions, the video doesn't start
> > playing.
> > I control by making Screenshot using Selenium/WebDriver. And via Selenium
> > the video box always appears empty.
> > Although seems fine in a non-selenium based test run.
> >
> > This is the browser log when running via selenium:
> > https://pastebin.ubuntu.com/p/pygBkSr4Kr/
> >
> > I do not see any difference between this log (unsuccessful == no video)
> and
> > a successful run in another browser.
> >
> > Both are using Chrome.
> >
> > Thanks,
> > Seb
> >
> > Sebastian Wagner
> > Director Arrakeen Solutions
> > http://arrakeen-solutions.co.nz/
> > <
> >
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> > >
> > <
> >
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> > >
> >
> >
> > On Sun, 1 Nov 2020 at 15:18, Maxim Solodovnik <so...@gmail.com>
> > wrote:
> >
> > > I saw no issues with this dialog during my testing
> > > What are your steps?
> > >
> > > On Sun, 1 Nov 2020 at 09:15, Maxim Solodovnik <so...@gmail.com>
> > > wrote:
> > >
> > > > This dialog is created here
> > > >
> > > >
> > >
> >
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js#L246
> > > >
> > > > According to https://api.jqueryui.com/dialog/#option-buttons
> > > > ID or class can't be added
> > > >
> > > > Maybe some pre-defined markup can be created to bypass this
> > > >
> > > > On Sun, 1 Nov 2020 at 05:35, seba.wagner@gmail.com <
> > > seba.wagner@gmail.com>
> > > > wrote:
> > > >
> > > >> That worked for the first screen. Thanks!
> > > >>
> > > >> But then the next screen is the "Permission is required" screen. See
> > > >> below screenshot and screen paste link.
> > > >>
> > > >> Generally there is some sort of issue where you can often notice
> that
> > > the
> > > >> video screen stays empty. It also happens with 2 browsers locally
> > quite
> > > >> often.
> > > >>
> > > >> However with this latest snapshot: I noticed that in the latest
> > snapshot
> > > >> the video/mic enable functionality has some issues. The icons
> > sometimes
> > > >> become unresponsive, the audio/video sharing state does not
> correspond
> > > with
> > > >> the current sharing setting icons.
> > > >>
> > > >> Both will require a bit more testing to replicate more stable.
> > > >>
> > > >> However it would be good to find out below dialog so I can update my
> > > >> Selenium test.
> > > >>
> > > >> What would be below dialog and how to set a class on it so I can
> > > uniquely
> > > >> identify this OK button ?
> > > >>
> > > >> Thanks
> > > >> Seb
> > > >>
> > > >> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
> > > >> [image: image.png]
> > > >>
> > > >> Sebastian Wagner
> > > >> Director Arrakeen Solutions
> > > >> http://arrakeen-solutions.co.nz/
> > > >>
> > > >> <
> > >
> >
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> > > >
> > > >> <
> > >
> >
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> > > >
> > > >>
> > > >>
> > > >> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
> > > >>
> > > >>> Great let try that!
> > > >>>
> > > >>> Sent from my iPhone
> > > >>>
> > > >>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <
> solomax666@gmail.com>
> > > >>> wrote:
> > > >>> >
> > > >>> > You can
> > > >>> >
> > > >>> > go to
> > > >>> >
> > > >>>
> > >
> >
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
> > > >>> > add `class="room-nickname-dialog"`
> > > >>> >
> > > >>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
> > > >>> > or even better
> > > >>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
> > > >>> >
> > > >>> > p.s. finally I wrote all UI tests using WicketTester, which is
> not
> > > >>> ideal
> > > >>> > but it works :)
> > > >>> >
> > > >>> >
> > > >>> >
> > > >>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
> > > >>> seba.wagner@gmail.com>
> > > >>> >> wrote:
> > > >>> >>
> > > >>> >> Hi,
> > > >>> >>
> > > >>> >> I want to write a selenium test that clicks away the Guest login
> > > modal
> > > >>> >> window.
> > > >>> >>
> > > >>> >> See below image for a screenshot of the modal or click here:
> > > >>> >> https://snipboard.io/fLAHRk.jpg
> > > >>> >>
> > > >>> >> But the "OK" button in that modal has a changing ID on every
> > reload.
> > > >>> >> And it has a very generic selector, for example I tried with
> > > >>> "#contents
> > > >>> >> .btn.btn-outline-primary"
> > > >>> >>
> > > >>> >> But using Selenium it finds too many matches for this selector:
> > > >>> >> Running command: waitForElementVisible ('#contents
> > > >>> >> .btn.btn-outline-primary', 20000)
> > > >>> >>
> > > >>> >> Warning: More than one element (19) found for element <#contents
> > > >>> >> .btn.btn-outline-primary> with selector: "#contents
> > > >>> >> .btn.btn-outline-primary". Only the first one will be used.
> > > >>> >>
> > > >>> >> => There are obviously too many of those OK buttons. So it's
> > > >>> impossible to
> > > >>> >> click this modal away.
> > > >>> >>
> > > >>> >> Is there a way to set a CSS class or ID that is unique (and
> > > >>> *predictable*!)
> > > >>> >> so this guest popup can be clicked away via Selenium ?
> > > >>> >>
> > > >>> >> Thanks
> > > >>> >> Seb
> > > >>> >>
> > > >>> >> Guest popup login:
> > > >>> >> [image: image.png]
> > > >>> >>
> > > >>> >>
> > > >>> >> Sebastian Wagner
> > > >>> >> Director Arrakeen Solutions
> > > >>> >> http://arrakeen-solutions.co.nz/
> > > >>> >>
> > > >>> >> <
> > > >>>
> > >
> >
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> > > >>> >
> > > >>> >> <
> > > >>>
> > >
> >
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> > > >>> >
> > > >>> >>
> > > >>> >
> > > >>> >
> > > >>> > --
> > > >>> > Best regards,
> > > >>> > Maxim
> > > >>>
> > > >>
> > > >
> > > > --
> > > > Best regards,
> > > > Maxim
> > > >
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> >
>
>
> --
> Best regards,
> Maxim
>

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by Maxim Solodovnik <so...@gmail.com>.
I would recommend to try to start chrome with custom flags :)

On Sun, 1 Nov 2020 at 13:27, seba.wagner@gmail.com <se...@gmail.com>
wrote:

> yeah like I say: I solved that issue (see my PR).
>
> But even though confirming the permissions, the video doesn't start
> playing.
> I control by making Screenshot using Selenium/WebDriver. And via Selenium
> the video box always appears empty.
> Although seems fine in a non-selenium based test run.
>
> This is the browser log when running via selenium:
> https://pastebin.ubuntu.com/p/pygBkSr4Kr/
>
> I do not see any difference between this log (unsuccessful == no video) and
> a successful run in another browser.
>
> Both are using Chrome.
>
> Thanks,
> Seb
>
> Sebastian Wagner
> Director Arrakeen Solutions
> http://arrakeen-solutions.co.nz/
> <
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> >
> <
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> >
>
>
> On Sun, 1 Nov 2020 at 15:18, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > I saw no issues with this dialog during my testing
> > What are your steps?
> >
> > On Sun, 1 Nov 2020 at 09:15, Maxim Solodovnik <so...@gmail.com>
> > wrote:
> >
> > > This dialog is created here
> > >
> > >
> >
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js#L246
> > >
> > > According to https://api.jqueryui.com/dialog/#option-buttons
> > > ID or class can't be added
> > >
> > > Maybe some pre-defined markup can be created to bypass this
> > >
> > > On Sun, 1 Nov 2020 at 05:35, seba.wagner@gmail.com <
> > seba.wagner@gmail.com>
> > > wrote:
> > >
> > >> That worked for the first screen. Thanks!
> > >>
> > >> But then the next screen is the "Permission is required" screen. See
> > >> below screenshot and screen paste link.
> > >>
> > >> Generally there is some sort of issue where you can often notice that
> > the
> > >> video screen stays empty. It also happens with 2 browsers locally
> quite
> > >> often.
> > >>
> > >> However with this latest snapshot: I noticed that in the latest
> snapshot
> > >> the video/mic enable functionality has some issues. The icons
> sometimes
> > >> become unresponsive, the audio/video sharing state does not correspond
> > with
> > >> the current sharing setting icons.
> > >>
> > >> Both will require a bit more testing to replicate more stable.
> > >>
> > >> However it would be good to find out below dialog so I can update my
> > >> Selenium test.
> > >>
> > >> What would be below dialog and how to set a class on it so I can
> > uniquely
> > >> identify this OK button ?
> > >>
> > >> Thanks
> > >> Seb
> > >>
> > >> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
> > >> [image: image.png]
> > >>
> > >> Sebastian Wagner
> > >> Director Arrakeen Solutions
> > >> http://arrakeen-solutions.co.nz/
> > >>
> > >> <
> >
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> > >
> > >> <
> >
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> > >
> > >>
> > >>
> > >> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
> > >>
> > >>> Great let try that!
> > >>>
> > >>> Sent from my iPhone
> > >>>
> > >>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
> > >>> wrote:
> > >>> >
> > >>> > You can
> > >>> >
> > >>> > go to
> > >>> >
> > >>>
> >
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
> > >>> > add `class="room-nickname-dialog"`
> > >>> >
> > >>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
> > >>> > or even better
> > >>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
> > >>> >
> > >>> > p.s. finally I wrote all UI tests using WicketTester, which is not
> > >>> ideal
> > >>> > but it works :)
> > >>> >
> > >>> >
> > >>> >
> > >>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
> > >>> seba.wagner@gmail.com>
> > >>> >> wrote:
> > >>> >>
> > >>> >> Hi,
> > >>> >>
> > >>> >> I want to write a selenium test that clicks away the Guest login
> > modal
> > >>> >> window.
> > >>> >>
> > >>> >> See below image for a screenshot of the modal or click here:
> > >>> >> https://snipboard.io/fLAHRk.jpg
> > >>> >>
> > >>> >> But the "OK" button in that modal has a changing ID on every
> reload.
> > >>> >> And it has a very generic selector, for example I tried with
> > >>> "#contents
> > >>> >> .btn.btn-outline-primary"
> > >>> >>
> > >>> >> But using Selenium it finds too many matches for this selector:
> > >>> >> Running command: waitForElementVisible ('#contents
> > >>> >> .btn.btn-outline-primary', 20000)
> > >>> >>
> > >>> >> Warning: More than one element (19) found for element <#contents
> > >>> >> .btn.btn-outline-primary> with selector: "#contents
> > >>> >> .btn.btn-outline-primary". Only the first one will be used.
> > >>> >>
> > >>> >> => There are obviously too many of those OK buttons. So it's
> > >>> impossible to
> > >>> >> click this modal away.
> > >>> >>
> > >>> >> Is there a way to set a CSS class or ID that is unique (and
> > >>> *predictable*!)
> > >>> >> so this guest popup can be clicked away via Selenium ?
> > >>> >>
> > >>> >> Thanks
> > >>> >> Seb
> > >>> >>
> > >>> >> Guest popup login:
> > >>> >> [image: image.png]
> > >>> >>
> > >>> >>
> > >>> >> Sebastian Wagner
> > >>> >> Director Arrakeen Solutions
> > >>> >> http://arrakeen-solutions.co.nz/
> > >>> >>
> > >>> >> <
> > >>>
> >
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> > >>> >
> > >>> >> <
> > >>>
> >
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> > >>> >
> > >>> >>
> > >>> >
> > >>> >
> > >>> > --
> > >>> > Best regards,
> > >>> > Maxim
> > >>>
> > >>
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> >
> >
> > --
> > Best regards,
> > Maxim
> >
>


-- 
Best regards,
Maxim

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
yeah like I say: I solved that issue (see my PR).

But even though confirming the permissions, the video doesn't start playing.
I control by making Screenshot using Selenium/WebDriver. And via Selenium
the video box always appears empty.
Although seems fine in a non-selenium based test run.

This is the browser log when running via selenium:
https://pastebin.ubuntu.com/p/pygBkSr4Kr/

I do not see any difference between this log (unsuccessful == no video) and
a successful run in another browser.

Both are using Chrome.

Thanks,
Seb

Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>


On Sun, 1 Nov 2020 at 15:18, Maxim Solodovnik <so...@gmail.com> wrote:

> I saw no issues with this dialog during my testing
> What are your steps?
>
> On Sun, 1 Nov 2020 at 09:15, Maxim Solodovnik <so...@gmail.com>
> wrote:
>
> > This dialog is created here
> >
> >
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js#L246
> >
> > According to https://api.jqueryui.com/dialog/#option-buttons
> > ID or class can't be added
> >
> > Maybe some pre-defined markup can be created to bypass this
> >
> > On Sun, 1 Nov 2020 at 05:35, seba.wagner@gmail.com <
> seba.wagner@gmail.com>
> > wrote:
> >
> >> That worked for the first screen. Thanks!
> >>
> >> But then the next screen is the "Permission is required" screen. See
> >> below screenshot and screen paste link.
> >>
> >> Generally there is some sort of issue where you can often notice that
> the
> >> video screen stays empty. It also happens with 2 browsers locally quite
> >> often.
> >>
> >> However with this latest snapshot: I noticed that in the latest snapshot
> >> the video/mic enable functionality has some issues. The icons sometimes
> >> become unresponsive, the audio/video sharing state does not correspond
> with
> >> the current sharing setting icons.
> >>
> >> Both will require a bit more testing to replicate more stable.
> >>
> >> However it would be good to find out below dialog so I can update my
> >> Selenium test.
> >>
> >> What would be below dialog and how to set a class on it so I can
> uniquely
> >> identify this OK button ?
> >>
> >> Thanks
> >> Seb
> >>
> >> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
> >> [image: image.png]
> >>
> >> Sebastian Wagner
> >> Director Arrakeen Solutions
> >> http://arrakeen-solutions.co.nz/
> >>
> >> <
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> >
> >> <
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> >
> >>
> >>
> >> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
> >>
> >>> Great let try that!
> >>>
> >>> Sent from my iPhone
> >>>
> >>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
> >>> wrote:
> >>> >
> >>> > You can
> >>> >
> >>> > go to
> >>> >
> >>>
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
> >>> > add `class="room-nickname-dialog"`
> >>> >
> >>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
> >>> > or even better
> >>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
> >>> >
> >>> > p.s. finally I wrote all UI tests using WicketTester, which is not
> >>> ideal
> >>> > but it works :)
> >>> >
> >>> >
> >>> >
> >>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
> >>> seba.wagner@gmail.com>
> >>> >> wrote:
> >>> >>
> >>> >> Hi,
> >>> >>
> >>> >> I want to write a selenium test that clicks away the Guest login
> modal
> >>> >> window.
> >>> >>
> >>> >> See below image for a screenshot of the modal or click here:
> >>> >> https://snipboard.io/fLAHRk.jpg
> >>> >>
> >>> >> But the "OK" button in that modal has a changing ID on every reload.
> >>> >> And it has a very generic selector, for example I tried with
> >>> "#contents
> >>> >> .btn.btn-outline-primary"
> >>> >>
> >>> >> But using Selenium it finds too many matches for this selector:
> >>> >> Running command: waitForElementVisible ('#contents
> >>> >> .btn.btn-outline-primary', 20000)
> >>> >>
> >>> >> Warning: More than one element (19) found for element <#contents
> >>> >> .btn.btn-outline-primary> with selector: "#contents
> >>> >> .btn.btn-outline-primary". Only the first one will be used.
> >>> >>
> >>> >> => There are obviously too many of those OK buttons. So it's
> >>> impossible to
> >>> >> click this modal away.
> >>> >>
> >>> >> Is there a way to set a CSS class or ID that is unique (and
> >>> *predictable*!)
> >>> >> so this guest popup can be clicked away via Selenium ?
> >>> >>
> >>> >> Thanks
> >>> >> Seb
> >>> >>
> >>> >> Guest popup login:
> >>> >> [image: image.png]
> >>> >>
> >>> >>
> >>> >> Sebastian Wagner
> >>> >> Director Arrakeen Solutions
> >>> >> http://arrakeen-solutions.co.nz/
> >>> >>
> >>> >> <
> >>>
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> >>> >
> >>> >> <
> >>>
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> >>> >
> >>> >>
> >>> >
> >>> >
> >>> > --
> >>> > Best regards,
> >>> > Maxim
> >>>
> >>
> >
> > --
> > Best regards,
> > Maxim
> >
>
>
> --
> Best regards,
> Maxim
>

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by Maxim Solodovnik <so...@gmail.com>.
I saw no issues with this dialog during my testing
What are your steps?

On Sun, 1 Nov 2020 at 09:15, Maxim Solodovnik <so...@gmail.com> wrote:

> This dialog is created here
>
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js#L246
>
> According to https://api.jqueryui.com/dialog/#option-buttons
> ID or class can't be added
>
> Maybe some pre-defined markup can be created to bypass this
>
> On Sun, 1 Nov 2020 at 05:35, seba.wagner@gmail.com <se...@gmail.com>
> wrote:
>
>> That worked for the first screen. Thanks!
>>
>> But then the next screen is the "Permission is required" screen. See
>> below screenshot and screen paste link.
>>
>> Generally there is some sort of issue where you can often notice that the
>> video screen stays empty. It also happens with 2 browsers locally quite
>> often.
>>
>> However with this latest snapshot: I noticed that in the latest snapshot
>> the video/mic enable functionality has some issues. The icons sometimes
>> become unresponsive, the audio/video sharing state does not correspond with
>> the current sharing setting icons.
>>
>> Both will require a bit more testing to replicate more stable.
>>
>> However it would be good to find out below dialog so I can update my
>> Selenium test.
>>
>> What would be below dialog and how to set a class on it so I can uniquely
>> identify this OK button ?
>>
>> Thanks
>> Seb
>>
>> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
>> [image: image.png]
>>
>> Sebastian Wagner
>> Director Arrakeen Solutions
>> http://arrakeen-solutions.co.nz/
>>
>> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
>> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>>
>>
>> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
>>
>>> Great let try that!
>>>
>>> Sent from my iPhone
>>>
>>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
>>> wrote:
>>> >
>>> > You can
>>> >
>>> > go to
>>> >
>>> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
>>> > add `class="room-nickname-dialog"`
>>> >
>>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
>>> > or even better
>>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
>>> >
>>> > p.s. finally I wrote all UI tests using WicketTester, which is not
>>> ideal
>>> > but it works :)
>>> >
>>> >
>>> >
>>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
>>> seba.wagner@gmail.com>
>>> >> wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> I want to write a selenium test that clicks away the Guest login modal
>>> >> window.
>>> >>
>>> >> See below image for a screenshot of the modal or click here:
>>> >> https://snipboard.io/fLAHRk.jpg
>>> >>
>>> >> But the "OK" button in that modal has a changing ID on every reload.
>>> >> And it has a very generic selector, for example I tried with
>>> "#contents
>>> >> .btn.btn-outline-primary"
>>> >>
>>> >> But using Selenium it finds too many matches for this selector:
>>> >> Running command: waitForElementVisible ('#contents
>>> >> .btn.btn-outline-primary', 20000)
>>> >>
>>> >> Warning: More than one element (19) found for element <#contents
>>> >> .btn.btn-outline-primary> with selector: "#contents
>>> >> .btn.btn-outline-primary". Only the first one will be used.
>>> >>
>>> >> => There are obviously too many of those OK buttons. So it's
>>> impossible to
>>> >> click this modal away.
>>> >>
>>> >> Is there a way to set a CSS class or ID that is unique (and
>>> *predictable*!)
>>> >> so this guest popup can be clicked away via Selenium ?
>>> >>
>>> >> Thanks
>>> >> Seb
>>> >>
>>> >> Guest popup login:
>>> >> [image: image.png]
>>> >>
>>> >>
>>> >> Sebastian Wagner
>>> >> Director Arrakeen Solutions
>>> >> http://arrakeen-solutions.co.nz/
>>> >>
>>> >> <
>>> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
>>> >
>>> >> <
>>> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
>>> >
>>> >>
>>> >
>>> >
>>> > --
>>> > Best regards,
>>> > Maxim
>>>
>>
>
> --
> Best regards,
> Maxim
>


-- 
Best regards,
Maxim

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by Maxim Solodovnik <so...@gmail.com>.
This dialog is created here
https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js#L246

According to https://api.jqueryui.com/dialog/#option-buttons
ID or class can't be added

Maybe some pre-defined markup can be created to bypass this

On Sun, 1 Nov 2020 at 05:35, seba.wagner@gmail.com <se...@gmail.com>
wrote:

> That worked for the first screen. Thanks!
>
> But then the next screen is the "Permission is required" screen. See below
> screenshot and screen paste link.
>
> Generally there is some sort of issue where you can often notice that the
> video screen stays empty. It also happens with 2 browsers locally quite
> often.
>
> However with this latest snapshot: I noticed that in the latest snapshot
> the video/mic enable functionality has some issues. The icons sometimes
> become unresponsive, the audio/video sharing state does not correspond with
> the current sharing setting icons.
>
> Both will require a bit more testing to replicate more stable.
>
> However it would be good to find out below dialog so I can update my
> Selenium test.
>
> What would be below dialog and how to set a class on it so I can uniquely
> identify this OK button ?
>
> Thanks
> Seb
>
> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
> [image: image.png]
>
> Sebastian Wagner
> Director Arrakeen Solutions
> http://arrakeen-solutions.co.nz/
>
> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>
>
> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
>
>> Great let try that!
>>
>> Sent from my iPhone
>>
>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
>> wrote:
>> >
>> > You can
>> >
>> > go to
>> >
>> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
>> > add `class="room-nickname-dialog"`
>> >
>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
>> > or even better
>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
>> >
>> > p.s. finally I wrote all UI tests using WicketTester, which is not ideal
>> > but it works :)
>> >
>> >
>> >
>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
>> seba.wagner@gmail.com>
>> >> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I want to write a selenium test that clicks away the Guest login modal
>> >> window.
>> >>
>> >> See below image for a screenshot of the modal or click here:
>> >> https://snipboard.io/fLAHRk.jpg
>> >>
>> >> But the "OK" button in that modal has a changing ID on every reload.
>> >> And it has a very generic selector, for example I tried with "#contents
>> >> .btn.btn-outline-primary"
>> >>
>> >> But using Selenium it finds too many matches for this selector:
>> >> Running command: waitForElementVisible ('#contents
>> >> .btn.btn-outline-primary', 20000)
>> >>
>> >> Warning: More than one element (19) found for element <#contents
>> >> .btn.btn-outline-primary> with selector: "#contents
>> >> .btn.btn-outline-primary". Only the first one will be used.
>> >>
>> >> => There are obviously too many of those OK buttons. So it's
>> impossible to
>> >> click this modal away.
>> >>
>> >> Is there a way to set a CSS class or ID that is unique (and
>> *predictable*!)
>> >> so this guest popup can be clicked away via Selenium ?
>> >>
>> >> Thanks
>> >> Seb
>> >>
>> >> Guest popup login:
>> >> [image: image.png]
>> >>
>> >>
>> >> Sebastian Wagner
>> >> Director Arrakeen Solutions
>> >> http://arrakeen-solutions.co.nz/
>> >>
>> >> <
>> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
>> >
>> >> <
>> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
>> >
>> >>
>> >
>> >
>> > --
>> > Best regards,
>> > Maxim
>>
>

-- 
Best regards,
Maxim

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
Yeah that was it.

However after OK'ing this Permission button it still doesn't show up the
video:
https://snipboard.io/40OhRd.jpg

You just get stuck with a screen without video.

I had another browser session open that played back the video fine.

But I have seen similar issues on entering a conference room and the
initial video wasn't showing up. This one seems a bit different though. As
it never shows the video at all. Even though permissions should be fine now.

Is there any debug log I could check to verify the video has been loaded
correctly?

Thanks,
Sebastian

Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>


On Sun, 1 Nov 2020 at 13:31, seba.wagner@gmail.com <se...@gmail.com>
wrote:

> #ask-permission
>
> But that doesn't work, since the OK button is outside of the
> #ask-permission DIV.
>
> Any ideas ?
> I assume I need to add another CSS class to the dialog window.
>
> Thanks
> Seb
>
> Sebastian Wagner
> Director Arrakeen Solutions
> http://arrakeen-solutions.co.nz/
>
> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>
>
> On Sun, 1 Nov 2020 at 11:51, seba.wagner@gmail.com <se...@gmail.com>
> wrote:
>
>> I think I found it, should be "#video.permission" ?
>>
>> Thanks
>> Seb
>>
>> Sebastian Wagner
>> Director Arrakeen Solutions
>> http://arrakeen-solutions.co.nz/
>>
>> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
>> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>>
>>
>> On Sun, 1 Nov 2020 at 11:34, seba.wagner@gmail.com <se...@gmail.com>
>> wrote:
>>
>>> That worked for the first screen. Thanks!
>>>
>>> But then the next screen is the "Permission is required" screen. See
>>> below screenshot and screen paste link.
>>>
>>> Generally there is some sort of issue where you can often notice that
>>> the video screen stays empty. It also happens with 2 browsers locally quite
>>> often.
>>>
>>> However with this latest snapshot: I noticed that in the latest snapshot
>>> the video/mic enable functionality has some issues. The icons sometimes
>>> become unresponsive, the audio/video sharing state does not correspond with
>>> the current sharing setting icons.
>>>
>>> Both will require a bit more testing to replicate more stable.
>>>
>>> However it would be good to find out below dialog so I can update my
>>> Selenium test.
>>>
>>> What would be below dialog and how to set a class on it so I can
>>> uniquely identify this OK button ?
>>>
>>> Thanks
>>> Seb
>>>
>>> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
>>> [image: image.png]
>>>
>>> Sebastian Wagner
>>> Director Arrakeen Solutions
>>> http://arrakeen-solutions.co.nz/
>>>
>>> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
>>> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>>>
>>>
>>> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
>>>
>>>> Great let try that!
>>>>
>>>> Sent from my iPhone
>>>>
>>>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
>>>> wrote:
>>>> >
>>>> > You can
>>>> >
>>>> > go to
>>>> >
>>>> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
>>>> > add `class="room-nickname-dialog"`
>>>> >
>>>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
>>>> > or even better
>>>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
>>>> >
>>>> > p.s. finally I wrote all UI tests using WicketTester, which is not
>>>> ideal
>>>> > but it works :)
>>>> >
>>>> >
>>>> >
>>>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
>>>> seba.wagner@gmail.com>
>>>> >> wrote:
>>>> >>
>>>> >> Hi,
>>>> >>
>>>> >> I want to write a selenium test that clicks away the Guest login
>>>> modal
>>>> >> window.
>>>> >>
>>>> >> See below image for a screenshot of the modal or click here:
>>>> >> https://snipboard.io/fLAHRk.jpg
>>>> >>
>>>> >> But the "OK" button in that modal has a changing ID on every reload.
>>>> >> And it has a very generic selector, for example I tried with
>>>> "#contents
>>>> >> .btn.btn-outline-primary"
>>>> >>
>>>> >> But using Selenium it finds too many matches for this selector:
>>>> >> Running command: waitForElementVisible ('#contents
>>>> >> .btn.btn-outline-primary', 20000)
>>>> >>
>>>> >> Warning: More than one element (19) found for element <#contents
>>>> >> .btn.btn-outline-primary> with selector: "#contents
>>>> >> .btn.btn-outline-primary". Only the first one will be used.
>>>> >>
>>>> >> => There are obviously too many of those OK buttons. So it's
>>>> impossible to
>>>> >> click this modal away.
>>>> >>
>>>> >> Is there a way to set a CSS class or ID that is unique (and
>>>> *predictable*!)
>>>> >> so this guest popup can be clicked away via Selenium ?
>>>> >>
>>>> >> Thanks
>>>> >> Seb
>>>> >>
>>>> >> Guest popup login:
>>>> >> [image: image.png]
>>>> >>
>>>> >>
>>>> >> Sebastian Wagner
>>>> >> Director Arrakeen Solutions
>>>> >> http://arrakeen-solutions.co.nz/
>>>> >>
>>>> >> <
>>>> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
>>>> >
>>>> >> <
>>>> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
>>>> >
>>>> >>
>>>> >
>>>> >
>>>> > --
>>>> > Best regards,
>>>> > Maxim
>>>>
>>>

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
#ask-permission

But that doesn't work, since the OK button is outside of the
#ask-permission DIV.

Any ideas ?
I assume I need to add another CSS class to the dialog window.

Thanks
Seb

Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>


On Sun, 1 Nov 2020 at 11:51, seba.wagner@gmail.com <se...@gmail.com>
wrote:

> I think I found it, should be "#video.permission" ?
>
> Thanks
> Seb
>
> Sebastian Wagner
> Director Arrakeen Solutions
> http://arrakeen-solutions.co.nz/
>
> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>
>
> On Sun, 1 Nov 2020 at 11:34, seba.wagner@gmail.com <se...@gmail.com>
> wrote:
>
>> That worked for the first screen. Thanks!
>>
>> But then the next screen is the "Permission is required" screen. See
>> below screenshot and screen paste link.
>>
>> Generally there is some sort of issue where you can often notice that the
>> video screen stays empty. It also happens with 2 browsers locally quite
>> often.
>>
>> However with this latest snapshot: I noticed that in the latest snapshot
>> the video/mic enable functionality has some issues. The icons sometimes
>> become unresponsive, the audio/video sharing state does not correspond with
>> the current sharing setting icons.
>>
>> Both will require a bit more testing to replicate more stable.
>>
>> However it would be good to find out below dialog so I can update my
>> Selenium test.
>>
>> What would be below dialog and how to set a class on it so I can uniquely
>> identify this OK button ?
>>
>> Thanks
>> Seb
>>
>> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
>> [image: image.png]
>>
>> Sebastian Wagner
>> Director Arrakeen Solutions
>> http://arrakeen-solutions.co.nz/
>>
>> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
>> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>>
>>
>> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
>>
>>> Great let try that!
>>>
>>> Sent from my iPhone
>>>
>>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
>>> wrote:
>>> >
>>> > You can
>>> >
>>> > go to
>>> >
>>> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
>>> > add `class="room-nickname-dialog"`
>>> >
>>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
>>> > or even better
>>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
>>> >
>>> > p.s. finally I wrote all UI tests using WicketTester, which is not
>>> ideal
>>> > but it works :)
>>> >
>>> >
>>> >
>>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
>>> seba.wagner@gmail.com>
>>> >> wrote:
>>> >>
>>> >> Hi,
>>> >>
>>> >> I want to write a selenium test that clicks away the Guest login modal
>>> >> window.
>>> >>
>>> >> See below image for a screenshot of the modal or click here:
>>> >> https://snipboard.io/fLAHRk.jpg
>>> >>
>>> >> But the "OK" button in that modal has a changing ID on every reload.
>>> >> And it has a very generic selector, for example I tried with
>>> "#contents
>>> >> .btn.btn-outline-primary"
>>> >>
>>> >> But using Selenium it finds too many matches for this selector:
>>> >> Running command: waitForElementVisible ('#contents
>>> >> .btn.btn-outline-primary', 20000)
>>> >>
>>> >> Warning: More than one element (19) found for element <#contents
>>> >> .btn.btn-outline-primary> with selector: "#contents
>>> >> .btn.btn-outline-primary". Only the first one will be used.
>>> >>
>>> >> => There are obviously too many of those OK buttons. So it's
>>> impossible to
>>> >> click this modal away.
>>> >>
>>> >> Is there a way to set a CSS class or ID that is unique (and
>>> *predictable*!)
>>> >> so this guest popup can be clicked away via Selenium ?
>>> >>
>>> >> Thanks
>>> >> Seb
>>> >>
>>> >> Guest popup login:
>>> >> [image: image.png]
>>> >>
>>> >>
>>> >> Sebastian Wagner
>>> >> Director Arrakeen Solutions
>>> >> http://arrakeen-solutions.co.nz/
>>> >>
>>> >> <
>>> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
>>> >
>>> >> <
>>> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
>>> >
>>> >>
>>> >
>>> >
>>> > --
>>> > Best regards,
>>> > Maxim
>>>
>>

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
I think I found it, should be "#video.permission" ?

Thanks
Seb

Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>


On Sun, 1 Nov 2020 at 11:34, seba.wagner@gmail.com <se...@gmail.com>
wrote:

> That worked for the first screen. Thanks!
>
> But then the next screen is the "Permission is required" screen. See below
> screenshot and screen paste link.
>
> Generally there is some sort of issue where you can often notice that the
> video screen stays empty. It also happens with 2 browsers locally quite
> often.
>
> However with this latest snapshot: I noticed that in the latest snapshot
> the video/mic enable functionality has some issues. The icons sometimes
> become unresponsive, the audio/video sharing state does not correspond with
> the current sharing setting icons.
>
> Both will require a bit more testing to replicate more stable.
>
> However it would be good to find out below dialog so I can update my
> Selenium test.
>
> What would be below dialog and how to set a class on it so I can uniquely
> identify this OK button ?
>
> Thanks
> Seb
>
> Screen: (see also: https://snipboard.io/DTmRyo.jpg)
> [image: image.png]
>
> Sebastian Wagner
> Director Arrakeen Solutions
> http://arrakeen-solutions.co.nz/
>
> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>
>
> On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:
>
>> Great let try that!
>>
>> Sent from my iPhone
>>
>> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
>> wrote:
>> >
>> > You can
>> >
>> > go to
>> >
>> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
>> > add `class="room-nickname-dialog"`
>> >
>> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
>> > or even better
>> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
>> >
>> > p.s. finally I wrote all UI tests using WicketTester, which is not ideal
>> > but it works :)
>> >
>> >
>> >
>> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
>> seba.wagner@gmail.com>
>> >> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I want to write a selenium test that clicks away the Guest login modal
>> >> window.
>> >>
>> >> See below image for a screenshot of the modal or click here:
>> >> https://snipboard.io/fLAHRk.jpg
>> >>
>> >> But the "OK" button in that modal has a changing ID on every reload.
>> >> And it has a very generic selector, for example I tried with "#contents
>> >> .btn.btn-outline-primary"
>> >>
>> >> But using Selenium it finds too many matches for this selector:
>> >> Running command: waitForElementVisible ('#contents
>> >> .btn.btn-outline-primary', 20000)
>> >>
>> >> Warning: More than one element (19) found for element <#contents
>> >> .btn.btn-outline-primary> with selector: "#contents
>> >> .btn.btn-outline-primary". Only the first one will be used.
>> >>
>> >> => There are obviously too many of those OK buttons. So it's
>> impossible to
>> >> click this modal away.
>> >>
>> >> Is there a way to set a CSS class or ID that is unique (and
>> *predictable*!)
>> >> so this guest popup can be clicked away via Selenium ?
>> >>
>> >> Thanks
>> >> Seb
>> >>
>> >> Guest popup login:
>> >> [image: image.png]
>> >>
>> >>
>> >> Sebastian Wagner
>> >> Director Arrakeen Solutions
>> >> http://arrakeen-solutions.co.nz/
>> >>
>> >> <
>> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
>> >
>> >> <
>> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
>> >
>> >>
>> >
>> >
>> > --
>> > Best regards,
>> > Maxim
>>
>

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
That worked for the first screen. Thanks!

But then the next screen is the "Permission is required" screen. See below
screenshot and screen paste link.

Generally there is some sort of issue where you can often notice that the
video screen stays empty. It also happens with 2 browsers locally quite
often.

However with this latest snapshot: I noticed that in the latest snapshot
the video/mic enable functionality has some issues. The icons sometimes
become unresponsive, the audio/video sharing state does not correspond with
the current sharing setting icons.

Both will require a bit more testing to replicate more stable.

However it would be good to find out below dialog so I can update my
Selenium test.

What would be below dialog and how to set a class on it so I can uniquely
identify this OK button ?

Thanks
Seb

Screen: (see also: https://snipboard.io/DTmRyo.jpg)
[image: image.png]

Sebastian Wagner
Director Arrakeen Solutions
http://arrakeen-solutions.co.nz/
<https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
<https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>


On Fri, 30 Oct 2020 at 15:32, <se...@gmail.com> wrote:

> Great let try that!
>
> Sent from my iPhone
>
> > On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com>
> wrote:
> >
> > You can
> >
> > go to
> >
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
> > add `class="room-nickname-dialog"`
> >
> > use `#contents .room-nickname-dialog .btn.btn-outline-primary`
> > or even better
> > `.room-container .room-nickname-dialog .btn.btn-outline-primary`
> >
> > p.s. finally I wrote all UI tests using WicketTester, which is not ideal
> > but it works :)
> >
> >
> >
> >> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <
> seba.wagner@gmail.com>
> >> wrote:
> >>
> >> Hi,
> >>
> >> I want to write a selenium test that clicks away the Guest login modal
> >> window.
> >>
> >> See below image for a screenshot of the modal or click here:
> >> https://snipboard.io/fLAHRk.jpg
> >>
> >> But the "OK" button in that modal has a changing ID on every reload.
> >> And it has a very generic selector, for example I tried with "#contents
> >> .btn.btn-outline-primary"
> >>
> >> But using Selenium it finds too many matches for this selector:
> >> Running command: waitForElementVisible ('#contents
> >> .btn.btn-outline-primary', 20000)
> >>
> >> Warning: More than one element (19) found for element <#contents
> >> .btn.btn-outline-primary> with selector: "#contents
> >> .btn.btn-outline-primary". Only the first one will be used.
> >>
> >> => There are obviously too many of those OK buttons. So it's impossible
> to
> >> click this modal away.
> >>
> >> Is there a way to set a CSS class or ID that is unique (and
> *predictable*!)
> >> so this guest popup can be clicked away via Selenium ?
> >>
> >> Thanks
> >> Seb
> >>
> >> Guest popup login:
> >> [image: image.png]
> >>
> >>
> >> Sebastian Wagner
> >> Director Arrakeen Solutions
> >> http://arrakeen-solutions.co.nz/
> >>
> >> <
> https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url
> >
> >> <
> https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url
> >
> >>
> >
> >
> > --
> > Best regards,
> > Maxim
>

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by se...@gmail.com.
Great let try that!

Sent from my iPhone

> On 30/10/2020, at 2:59 PM, Maxim Solodovnik <so...@gmail.com> wrote:
> 
> You can
> 
> go to
> https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
> add `class="room-nickname-dialog"`
> 
> use `#contents .room-nickname-dialog .btn.btn-outline-primary`
> or even better
> `.room-container .room-nickname-dialog .btn.btn-outline-primary`
> 
> p.s. finally I wrote all UI tests using WicketTester, which is not ideal
> but it works :)
> 
> 
> 
>> On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <se...@gmail.com>
>> wrote:
>> 
>> Hi,
>> 
>> I want to write a selenium test that clicks away the Guest login modal
>> window.
>> 
>> See below image for a screenshot of the modal or click here:
>> https://snipboard.io/fLAHRk.jpg
>> 
>> But the "OK" button in that modal has a changing ID on every reload.
>> And it has a very generic selector, for example I tried with "#contents
>> .btn.btn-outline-primary"
>> 
>> But using Selenium it finds too many matches for this selector:
>> Running command: waitForElementVisible ('#contents
>> .btn.btn-outline-primary', 20000)
>> 
>> Warning: More than one element (19) found for element <#contents
>> .btn.btn-outline-primary> with selector: "#contents
>> .btn.btn-outline-primary". Only the first one will be used.
>> 
>> => There are obviously too many of those OK buttons. So it's impossible to
>> click this modal away.
>> 
>> Is there a way to set a CSS class or ID that is unique (and *predictable*!)
>> so this guest popup can be clicked away via Selenium ?
>> 
>> Thanks
>> Seb
>> 
>> Guest popup login:
>> [image: image.png]
>> 
>> 
>> Sebastian Wagner
>> Director Arrakeen Solutions
>> http://arrakeen-solutions.co.nz/
>> 
>> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
>> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>> 
> 
> 
> -- 
> Best regards,
> Maxim

Re: Selenium test and unique and predictable ID or class required for guest login OK button

Posted by Maxim Solodovnik <so...@gmail.com>.
You can

go to
https://github.com/apache/openmeetings/blob/master/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.html#L37
add `class="room-nickname-dialog"`

use `#contents .room-nickname-dialog .btn.btn-outline-primary`
or even better
`.room-container .room-nickname-dialog .btn.btn-outline-primary`

p.s. finally I wrote all UI tests using WicketTester, which is not ideal
but it works :)



On Fri, 30 Oct 2020 at 08:51, seba.wagner@gmail.com <se...@gmail.com>
wrote:

> Hi,
>
> I want to write a selenium test that clicks away the Guest login modal
> window.
>
> See below image for a screenshot of the modal or click here:
> https://snipboard.io/fLAHRk.jpg
>
> But the "OK" button in that modal has a changing ID on every reload.
> And it has a very generic selector, for example I tried with "#contents
> .btn.btn-outline-primary"
>
> But using Selenium it finds too many matches for this selector:
> Running command: waitForElementVisible ('#contents
> .btn.btn-outline-primary', 20000)
>
> Warning: More than one element (19) found for element <#contents
> .btn.btn-outline-primary> with selector: "#contents
> .btn.btn-outline-primary". Only the first one will be used.
>
> => There are obviously too many of those OK buttons. So it's impossible to
> click this modal away.
>
> Is there a way to set a CSS class or ID that is unique (and *predictable*!)
> so this guest popup can be clicked away via Selenium ?
>
> Thanks
> Seb
>
> Guest popup login:
> [image: image.png]
>
>
> Sebastian Wagner
> Director Arrakeen Solutions
> http://arrakeen-solutions.co.nz/
>
> <https://www.youracclaim.com/badges/da4e8828-743d-4968-af6f-49033f10d60a/public_url>
> <https://www.youracclaim.com/badges/b7e709c6-aa87-4b02-9faf-099038475e36/public_url>
>


-- 
Best regards,
Maxim