@pytest.fixture
def webpage(qnam):
 QtWebKitWidgets = pytest.importorskip('PyQt5.QtWebKitWidgets')
 page = QtWebKitWidgets.QWebPage()
 page.networkAccessManager().deleteLater()
 page.setNetworkAccessManager(qnam)
 return page

@ pytest . fixture def webpage ( qnam ) : QtWebKitWidgets = pytest . importorskip ( 'PyQt5.QtWebKitWidgets' ) page = QtWebKitWidgets . QWebPage ( ) page . networkAccessManager ( ) . deleteLater ( ) page . setNetworkAccessManager ( qnam ) return page
get a new qwebpage object .