Didn't see this error before but in an internal application we saw
14:59:06.140 FAIL AttributeError: 'ngElementFinder' object has no attribute '_s2l'
14:59:06.141 DEBUG
Traceback (most recent call last): File "<decorator-gen-42>",line 2,
in get_text File "C:\Python27\lib\site-packages\Selenium2Library\keywords\keywordgroup.py", line 15,
in _run_on_failure_decorator return method(*args, **kwargs) File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_element.py", line 312,
in get_text return self._get_text(locator) File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_element.py", line 700,
in _get_text element = self._element_find(locator, True, True) File "C:\Python27\lib\site-packages\Selenium2Library\keywords\_element.py", line 678,
in _element_find elements = self._element_finder.find(browser, locator, tag) File "C:\Python27\lib\site-packages\Selenium2Library\locators\elementfinder.py", line 37,
in find return strategy(browser, criteria, tag, constraints) File "C:\Python27\lib\site-packages\AngularJSLibrary\__init__.py", line 29,
in _find_by_default return self._s2l._element_finder._find_by_xpath(browser, criteria, tag, constraints)
Make sense as that class has no definition of _s2l. Interesting I needed to run a modified set [1] of Selenium2Library tests to see it. More interesting only three of tests failed and all of these were recent changes for the WebElements addition. Mmmmm... [Running commentary as I debug tests...]
Ok. Modified unit tests [2] this time but still interesting found only one failing test. Seems like we have very little checks on using the shortcut locator for xpath.
[1] Simply modified test\acceptance\resource.robot to include the AngularJS Library
import unittest
import os
#from Selenium2Library.locators import ElementFinder
from AngularJSLibrary import ngElementFinder as ElementFinder
from mockito import *
from robot.utils.asserts import assert_raises_with_msg
# ...
Didn't see this error before but in an internal application we saw
Make sense as that class has no definition of _s2l. Interesting I needed to run a modified set [1] of Selenium2Library tests to see it. More interesting only three of tests failed and all of these were recent changes for the WebElements addition. Mmmmm... [Running commentary as I debug tests...]
Ok. Modified unit tests [2] this time but still interesting found only one failing test. Seems like we have very little checks on using the shortcut locator for xpath.
[1] Simply modified test\acceptance\resource.robot to include the AngularJS Library
[2] Modified tests\unit\locators\test_elementfinder.py