-
Notifications
You must be signed in to change notification settings - Fork 89
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
Comments
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. |
This issue has been closed due to inactivity. |
/kind feature |
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. |
This issue has been closed due to inactivity. |
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.
The text was updated successfully, but these errors were encountered: