@pytest.fixture(autouse=True)
def enable_caret_browsing(qapp):
 settings = QWebSettings.globalSettings()
 old_value = settings.testAttribute(QWebSettings.CaretBrowsingEnabled)
 settings.setAttribute(QWebSettings.CaretBrowsingEnabled, True)
 (yield)
 settings.setAttribute(QWebSettings.CaretBrowsingEnabled, old_value)

@ pytest . fixture ( autouse = True ) def enable_caret_browsing ( qapp ) : settings = QWebSettings . globalSettings ( ) old_value = settings . testAttribute ( QWebSettings . CaretBrowsingEnabled ) settings . setAttribute ( QWebSettings . CaretBrowsingEnabled , True ) ( yield ) settings . setAttribute ( QWebSettings . CaretBrowsingEnabled , old_value )
fixture to enable caret browsing globally .