-
Hi, First thanks for your work on this library. I have an issue which could just be of my own misunderstanding, or the setup of the Docker image I am using for testing with. Docker images comes prebuilt with:
When the test below is run locally on MacOS in headless mode I get a passing test, when I execute this on the AWS Codebuild docker image it looks like the call to open URL is not following the redirect, I think this is proved by the fact the URI of the current browser is still the same as the one it was opened with but it should have redirected to the oauth login URI. Any help or pointers on how to address this would be appreciated. def test_login(sb, setup_config):
print(f'heading to {setup_config["landing_uri"]}')
sb.open(setup_config['landing_uri'])
url_before_login = sb.get_current_url()
print(f'XXXXXX{sb.get_page_source()}XXXXX')
print(landing_uri: {setup_config["landing_uri"]}')
print(f'before login: {url_before_login}') # this should pring the redirected URI but it is still the same as landing_uri
sign_in_form_username = sb.find_visible_elements('input#signInFormUsername')
sign_in_form_username[0].send_keys(setup_config['username'])
sign_in_form_password = sb.find_visible_elements('input#signInFormPassword')
sign_in_form_password[0].send_keys(setup_config['password'])
sign_in_form_button = sb.find_visible_elements('input#signInFormPassword')
sign_in_form_button[0].submit()
url_after_login = sb.get_current_url()
assert url_before_login.startswith(f'https://{setup_config["prefix"]}-login.auth')
assert url_after_login.startswith(f'https://{setup_config["prefix"]}-app')
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @grahamhar Is there any type of exception message, etc, when you're running in Docker? Does the screenshot taken from the failing test show you what happened? |
Beta Was this translation helpful? Give feedback.
Hi @grahamhar Is there any type of exception message, etc, when you're running in Docker? Does the screenshot taken from the failing test show you what happened?
There is an existing Dockerfile with SeleniumBase if that helps: https://github.com/seleniumbase/SeleniumBase/blob/master/Dockerfile
(maybe the Dockerfile you used before did something unusual)