Skip to content

Open xdg-open #488

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lluisteamcmp opened this issue May 17, 2017 · 6 comments
Closed

Open xdg-open #488

lluisteamcmp opened this issue May 17, 2017 · 6 comments

Comments

@lluisteamcmp
Copy link

Meta -

Image(s):
node-chrome
Docker-Selenium Image Version(s):
3.4.0
OS:
OSX El capitan 10.11.6

On trying open a link like: intent://stream/#Intent;scheme=freevr;package=[PACKAGE_NAME];S.stream=[STREAM_URL] the xdg-open 'alert' appears. That makes losing control over the driver, per example the driver is unable to do a navigate.refresh.

Expected Behavior -

On opening such type of links, no other application than Chrome should not 'pop-up'.

Actual Behavior -

xdg-open tries to open such content from the URL and the driver stops working.


This is the trace of the error on trying a refresh once the 'xdg-open' pops up:

objc[4481]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

org.openqa.selenium.TimeoutException: timeout
  (Session info: chrome=58.0.3029.81)
  (Driver info: chromedriver=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5),platform=Linux 4.9.27-moby x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 15.01 seconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: '8889888d9c2b', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.27-moby', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5), userDataDir=/tmp/.org.chromium.Chromium.U0CuT5}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=58.0.3029.81, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
Session ID: 02bfe2b83b3bd65900eb2a3293accddb
Command duration or timeout: 15.02 seconds

Here is a screenshot of the xdg-open pops up:
image

@elgalu
Copy link
Member

elgalu commented May 17, 2017

Hi @lluisteamcmp thanks for reporting this.

Do you think you can also provide a solution? and even better via a pull request?

@ddavison
Copy link
Member

if this is a valid issue, then it's most likely an issue with SeleniumHQ/selenium - i'll await your response @lluisteamcmp

@lluisteamcmp
Copy link
Author

Hi @elgalu @ddavison I see this more as an issue that could be solved by modifying the dockerfile from the base node: https://github.com/SeleniumHQ/docker-selenium/blob/master/Base/Dockerfile
Something to make the xdg-utils not interact in such way: https://wiki.archlinux.org/index.php/Default_applications#xdg-utils
I will try to have a solution, but I have little knowledge on solving this type of issues.

@lluisteamcmp
Copy link
Author

@elgalu @ddavison I think this could be closed. This problem is more related to trying to test an intent to open an app using a desktop, simulating the mobile by the user agent.
Also I can reproduce the behavior of 'loosing' the driver on other environments than the docker node container.
I will open an issue to SeleniumHQ/selenium for this strange behavior when opening this intent type URL, but I to play fair, this is more related about using the wrong tool for the test. I should move to something like Appium to do such tests.

@elgalu
Copy link
Member

elgalu commented May 19, 2017

I agree. I will close but if you figure this out please post the link or the solution here so we can all learn from it ;)

@lluisteamcmp
Copy link
Author

Reported in ChromeDriver: https://bugs.chromium.org/p/chromedriver/issues/detail?id=1833

@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants