Skip to content

Commit 80e54aa

Browse files
committed
Fix errors when executing js by always enabling it
1 parent 1dd9df2 commit 80e54aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/webdriver/extension_qt/qwebkit_proxy.cc

+5
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,11 @@ Error* QWebkitProxy::ExecuteScriptImpl(QWebFrame* frame,
14321432
std::string *result,
14331433
bool isAsync)
14341434
{
1435+
auto settings = frame->page()->settings();
1436+
if (settings) {
1437+
settings->setAttribute(QWebSettings::JavascriptEnabled, true);
1438+
}
1439+
14351440
std::string res;
14361441
if (isAsync)
14371442
{

0 commit comments

Comments
 (0)