I could not understand where is my mistake. Everything seems ok but I can't get data from yml file.
Here is my yml file:
envdev:
base_url: url
user_name: user
password: password
envprod:
base_url: url
user_name: user
password: password
Here is my code in python:
with open("../env.yml", 'r') as yamlfile:
try:
yaml_file = yaml.safe_load(yamlfile)
except yaml.YAMLError as exc:
print(exc)
I am calling like this:
driver.get(yaml_file["envdev"]["base_url"])
And here is the error:
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.InvalidArgumentException: Message: invalid argument
E (Session info: chrome=90.0.4430.85)
/usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/errorhandler.py:242: InvalidArgumentException