mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
[BrowserTest] Fix ve.init is undefined
and ve.init.target is undefined
error messages
Looks like local browsers raise Selenium::WebDriver::Error::JavascriptError while remote (Sauce Labs) browsers raise Selenium::WebDriver::Error::UnknownError if a test tries to use an element but VisualEditor is not loaded. Bug: T126966 Change-Id: I89c8eaba996e95e7859084fe26e15befee9dce77
This commit is contained in:
parent
078886b5a4
commit
301b152ec8
|
@ -205,11 +205,11 @@ class VisualEditorPage
|
|||
loop do
|
||||
begin
|
||||
browser.execute_script script
|
||||
rescue Selenium::WebDriver::Error::JavascriptError => e
|
||||
rescue Selenium::WebDriver::Error::JavascriptError, Selenium::WebDriver::Error::UnknownError => e
|
||||
else
|
||||
e = nil
|
||||
end
|
||||
break unless e.class == Selenium::WebDriver::Error::JavascriptError
|
||||
break unless (e.class == Selenium::WebDriver::Error::JavascriptError) || (e.class == Selenium::WebDriver::Error::UnknownError)
|
||||
end
|
||||
end
|
||||
browser.execute_script script
|
||||
|
|
Loading…
Reference in a new issue