mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1101172: Correct Exception thrown when passing invalid element search type; r=jgriffin
--HG-- extra : rebase_source : 8da9313980a4895b72dcff1f2e46efe241a14c26
This commit is contained in:
parent
d648e9fd93
commit
01773cfd32
@ -5,7 +5,7 @@
|
||||
from marionette_test import MarionetteTestCase
|
||||
from marionette import HTMLElement
|
||||
from by import By
|
||||
from errors import NoSuchElementException
|
||||
from errors import NoSuchElementException, InvalidSelectorException
|
||||
|
||||
|
||||
class TestElements(MarionetteTestCase):
|
||||
@ -154,3 +154,8 @@ class TestElements(MarionetteTestCase):
|
||||
fbody = self.marionette.find_element(By.TAG_NAME, 'body')
|
||||
abody = self.marionette.get_active_element()
|
||||
self.assertEqual(fbody, abody)
|
||||
|
||||
def test_throws_error_when_trying_to_use_invalid_selector_type(self):
|
||||
test_html = self.marionette.absolute_url("test.html")
|
||||
self.marionette.navigate(test_html)
|
||||
self.assertRaises(InvalidSelectorException, self.marionette.find_element, "Brie Search Type", "doesn't matter")
|
||||
|
@ -293,7 +293,7 @@ ElementManager.prototype = {
|
||||
let startNode = (values.element != undefined) ?
|
||||
this.getKnownElement(values.element, win) : win.document;
|
||||
if (this.elementStrategies.indexOf(values.using) < 0) {
|
||||
throw new ElementException("No such strategy.", 17, null);
|
||||
throw new ElementException("No such strategy.", 32, null);
|
||||
}
|
||||
let found = all ? this.findElements(values.using, values.value, win.document, startNode) :
|
||||
this.findElement(values.using, values.value, win.document, startNode);
|
||||
|
Loading…
Reference in New Issue
Block a user