Skip to content
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

Example using selenium with authorization headers to write tests #288

Closed
jlewi opened this issue Jan 23, 2019 · 5 comments
Closed

Example using selenium with authorization headers to write tests #288

jlewi opened this issue Jan 23, 2019 · 5 comments

Comments

@jlewi
Copy link
Contributor

jlewi commented Jan 23, 2019

We'd like to be able to use selenium to write web tests.

I started to create a test with selenium
https://github.com/jlewi/kubeflow/blob/1690703d261d29ccd7e1d5ff154d79064473d9d8/kubeflow/jupyter/tests/jupyter_test.py#L85

The problem I ran into is authentication. If we aren't running inside the cluster than we need to proxy the request e.g. via IAP or the APIServer.

Using the APIServer we just need to add a request header containing the access token.

Selenium however doesn't make it easy to inject the request token. The solution seems to be to use
browsermobproxy - https://browsermob-proxy-py.readthedocs.io/en/stable/ proxy requests in order to set the request headers. I wasn't able to get that working.

Starting browsermobproxy seemed to freeze my code.

@stale
Copy link

stale bot commented Jul 25, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been closed due to inactivity.

@jtfogarty
Copy link

/kind feature

@stale
Copy link

stale bot commented Apr 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale label Apr 7, 2020
@stale
Copy link

stale bot commented Apr 14, 2020

This issue has been closed due to inactivity.

@stale stale bot closed this as completed Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants