@pytest.mark.usefixtures('redirect_webengine_data')
@pytest.mark.parametrize('js_enabled, expected', [(True, 2.0), (False, 2.0)])
def test_simple_js_webengine(callback_checker, webengineview, js_enabled, expected):
 from PyQt5.QtWebEngineWidgets import QWebEngineSettings
 webengineview.settings().setAttribute(QWebEngineSettings.JavascriptEnabled, js_enabled)
 webengineview.page().runJavaScript('1 + 1', callback_checker.callback)
 callback_checker.check(expected)

@ pytest . mark . usefixtures ( 'redirect_webengine_data' ) @ pytest . mark . parametrize ( 'js_enabled, expected' , [ ( True , 2.0 ) , ( False , 2.0 ) ] ) def test_simple_js_webengine ( callback_checker , webengineview , js_enabled , expected ) : from PyQt5 . QtWebEngineWidgets import QWebEngineSettings webengineview . settings ( ) . setAttribute ( QWebEngineSettings . JavascriptEnabled , js_enabled ) webengineview . page ( ) . runJavaScript ( '1 + 1' , callback_checker . callback ) callback_checker . check ( expected )
with qtwebengine .