• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 195

Backtrace:

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/views/question.php
Line: 195
Function: _error_handler

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/controllers/Questions.php
Line: 416
Function: view

File: /home/u125378470/domains/lawhelpguru.org/public_html/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Selenium web driver hangs while trying to test a Flask app

<button aria-describedby="--stacks-s-tooltip-bgikgitp" aria-label="Bookmark" aria-pressed="false" class="js-bookmark-btn s-btn s-btn__unset c-pointer py4 js-gps-track" data-controller="s-tooltip" data-gps-track="post.click({ item: 1, priv: 0, post_type: 1 })" data-s-tooltip-placement="right" data-selected-classes="fc-yellow-600"></button><svg aria-hidden="true" class="mln2 mr0 svg-icon iconHistory" height="18" viewbox="0 0 19 18" width="19"></svg>

 

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