WebContent: Pass the script timeout into the WebDriver script executor

This was dropped in 0b9803d and 31469ee before the timeouts object was
avaiable in WebContent.
This commit is contained in:
Timothy Flynn 2022-11-11 14:30:48 -05:00 committed by Linus Groh
parent 04f41bda52
commit 6a55370401
Notes: sideshowbarker 2024-07-17 07:20:49 +09:00

View file

@ -900,8 +900,7 @@ Messages::WebDriverClient::ExecuteScriptResponse WebDriverConnection::execute_sc
// FIXME: 3. Handle any user prompts, and return its value if it is an error.
// 4., 5.1-5.3.
// FIXME: Move timeouts from WebDriver to WebContent and pass the script timeout through here.
auto result = Web::WebDriver::execute_script(m_page_host.page(), body, move(arguments), {});
auto result = Web::WebDriver::execute_script(m_page_host.page(), body, move(arguments), m_timeouts_configuration.script_timeout);
dbgln_if(WEBDRIVER_DEBUG, "Executing script returned: {}", result.value);
switch (result.type) {
@ -932,8 +931,7 @@ Messages::WebDriverClient::ExecuteAsyncScriptResponse WebDriverConnection::execu
// FIXME: 3. Handle any user prompts, and return its value if it is an error.
// 4., 5.1-5.11.
// FIXME: Move timeouts from WebDriver to WebContent and pass the script timeout through here.
auto result = Web::WebDriver::execute_async_script(m_page_host.page(), body, move(arguments), {});
auto result = Web::WebDriver::execute_async_script(m_page_host.page(), body, move(arguments), m_timeouts_configuration.script_timeout);
dbgln_if(WEBDRIVER_DEBUG, "Executing async script returned: {}", result.value);
switch (result.type) {