You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title explains, running the Open With JupyterLab Menu keyword with File, Log Out arguments fails with the following JavaScript exception:
JavascriptException: Message: javascript error: Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite.
The issue seems to be that the locator used by the Click JupyterLab Menu Item keyword returns two hits when using Log Out as the argument in a JupyterHub environment (i.e. the hub:logout element is active instead of the filemenu:logout one).
In a single-user environment (i.e. the filemenu:logout element is active) the issue does not appear (because the hidden hub:logout element does not have the Log Out text).
There could be a number of ways to solve this issue, but before sending a PR I would like to get feedback on what would be the preferred solution. My current idea is to do a check on the ${label} passed to the keyword, and in the case of Log Out update the locator used to this: //div[contains(@class, 'p-Menu-itemLabel')][text() = 'Log Out']/..[not(contains(@class,'p-mod-disabled'))]
The ..[not(contains(@class,'p-mod-disabled'))] part will filter out the inactive element out of the two, and will work in both environments.
This could also be used for all inputs, as it should not break any existing functionality and will handle any ${label} that happens to exist twice; I have however not tested this yet on such a large scale.
The text was updated successfully, but these errors were encountered:
Yeah, that seems like a fine option for all of the menu stuff. I had some other stuff I was working not too long ago that ran into some related stuff, but don't remember how i worked around it. PR away, and i promise to be more responsive on reviewing that (and or #44).
Hey @bollwyvl , no worries.
I've opened a PR (#46) for this, and when I have some time will also go back to the PR for #44.
I've tested the new locator with a bunch of menu items and couldn't find anything breaking, but let me know if you want any other changes.
Just merged #46: you'll be able to pull the release sdist/wheel/conda package off the build of master, if you like, so you can assess if it meets your needs in a more "production" environment... and re-open if need be.
As the title explains, running the
Open With JupyterLab Menu
keyword withFile, Log Out
arguments fails with the following JavaScript exception:The issue seems to be that the locator used by the Click JupyterLab Menu Item keyword returns two hits when using
Log Out
as the argument in a JupyterHub environment (i.e. thehub:logout
element is active instead of thefilemenu:logout
one).In a single-user environment (i.e. the
filemenu:logout
element is active) the issue does not appear (because the hiddenhub:logout
element does not have theLog Out
text).There could be a number of ways to solve this issue, but before sending a PR I would like to get feedback on what would be the preferred solution. My current idea is to do a check on the
${label}
passed to the keyword, and in the case ofLog Out
update the locator used to this://div[contains(@class, 'p-Menu-itemLabel')][text() = 'Log Out']/..[not(contains(@class,'p-mod-disabled'))]
The
..[not(contains(@class,'p-mod-disabled'))]
part will filter out the inactive element out of the two, and will work in both environments.This could also be used for all inputs, as it should not break any existing functionality and will handle any ${label} that happens to exist twice; I have however not tested this yet on such a large scale.
The text was updated successfully, but these errors were encountered: