RSelenium
RSelenium copied to clipboard
How to configure trustAllSSLCertificates in rsDriver?
Operating System
OS X
Selenium Server version (selenium-server-standalone-3.0.1.jar etc.)
3.1.0 86a5d70
Browser version (firefox 50.1.0, chrome 54.0.2840.100 (64-bit) etc.)
Version 56.0.2924.87 (64-bit)
Other driver version (chromedriver 2.27, geckodriver v0.11.1, iedriver x64_3.0.0, PhantomJS 2.1.1 etc.)
Didn't configure any, using rsDriver default setting
Expected behaviour
Launch a tableau report directly (since in my other chrome window I already authenticated my credentials)
Actual behaviour
The test chrome window request to login, which breaks the automated flow
Steps to reproduce the behaviour
Try point to any tableau server that requires authentication
There's a different article (which I haven't tested as it's against the suggested rsDriver approach) https://www.r-bloggers.com/automatically-exporting-multiple-cross-tables-from-tableau-server-into-excel/ I'm wondering if there's any parameter I can enter to instruct the 'trustAllSSLCertificates' behaviour.
Thanks.
You can try adding a capability:
Key | Type | Description |
---|---|---|
acceptSslCerts | boolean | Whether the session should accept all SSL certs by default. |
rD <- rsDriver(extraCapabilities = list(acceptSslCerts = TRUE))
Thanks for the quick response, however I am still required to login each time.
Could you elaborate if there's a way to launch a new instance with the same credential which my 'main ' chrome instance already has? Or is it even possible to mandate the driver to only launch new tab to existing chrome instance and just open a new tab?
Looking at https://www.tableau.com/about/blog/2016/2/stay-connected-auto-sign-tableau-93-50775
It maybe sufficient to set up a new profile in chrome. In this new profile log into tableau server enabling auto login. Then call this profile when initiating a driver. See
http://stackoverflow.com/questions/42147239/enable-adblocker-extension-in-chrome-using-latest-version-of-rselenium/42155358#42155358
for additional information on launching profiles using OSX
Thanks. I was able to follow the profile approach and launch new window. However, it recognize my user profile but fail to log me in.
open() -> navigate() -> enter credential -> close window -> open() -> navigate() -> ask for credential again
Does this has something to do with cookie?
Update: I think the problem is: Tableau grants cookie after authentication. In regular chrome windows, those cookies are saved to the profile. The cookies will expire when 'browsing session ends' but closing chrome normally won't trigger a cleansing of such cookie. However, in RSelenium, I guess each remDr$close is considered browsing session ends and those cookies won't write to the profile.
Between open() and close(), I can see the cookies, remove them, rewrite them and be able to see a tableau report fine. However, if I run the close(), those cookies I saved as variable will no longer work as it's considered a new session.
I don't have access to a tableau server to test unfortunately. It is not possible to launch chrome using an existing session (profile) currently.