wordpress: functional test to create post fails in testing
_______________________________________________ test_post ________________________________________________
self = <splinter.element_list.ElementList object at 0x7fe9d2c96a30>, index = 0
def __getitem__(self, index):
if not isinstance(index, int) and not isinstance(index, slice):
return self.first[index]
try:
> return self._container[index]
E IndexError: list index out of range
../../../.local/lib/python3.9/site-packages/splinter/element_list.py:42: IndexError
During handling of the above exception, another exception occurred:
session_browser = <splinter.driver.webdriver.firefox.WebDriver object at 0x7fe9d2d2a400>
def test_post(session_browser):
"""Test writing a blog post."""
functional.app_enable(session_browser, 'wordpress')
> _write_post(session_browser, 'FunctionalTest')
plinth/modules/wordpress/tests/test_functional.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
plinth/modules/wordpress/tests/test_functional.py:134: in _write_post
browser.find_by_id('post-title-0').fill(title)
../../../.local/lib/python3.9/site-packages/splinter/element_list.py:76: in __getattr__
return getattr(self.first, name)
../../../.local/lib/python3.9/site-packages/splinter/element_list.py:57: in first
return self[0]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <splinter.element_list.ElementList object at 0x7fe9d2c96a30>, index = 0
def __getitem__(self, index):
if not isinstance(index, int) and not isinstance(index, slice):
return self.first[index]
try:
return self._container[index]
except IndexError:
> raise ElementDoesNotExist(
u'no elements could be found with {0} "{1}"'.format(
self.find_by, self.query
)
)
E splinter.exceptions.ElementDoesNotExist: no elements could be found with id "post-title-0"
../../../.local/lib/python3.9/site-packages/splinter/element_list.py:44: ElementDoesNotExist