I am trying to write an automated test for my web app and I encountering a weird issue;
when trying to call driver.get('https://my-local-app-url:port')
Chrome just hangs and never really opens the URL. However, when using the driver.get()
on Google.com it works just fine.
This is how I have everything set up:
The "test":
class TestApp:
def test_app(self, chrome_browser, app):
chrome_browser.get('https://google.com') << this xss=removed class="hljs-string">'127.0.0.1', port=8000)
chrome_browser.get('http://127.0.0.1:8000/') << this class="hljs-keyword">not execute
conftest.py:
@pytest.fixture(scope="session")
def chrome_browser():
browser = webdriver.Chrome()
return browser
@pytest.fixture(scope="session")
def app():
app = create_app()
return app
The create_app function:
def create_app():
app = Flask(__name__)
app.register_blueprint(blueprint)
return app
*Outside the test, the function create_app is working just fine and returning a Flask object. *My Chrome driver and chrome version are 86.04240.22