Commit 9f5e3f03 authored by Sam Saccone's avatar Sam Saccone

f

parent f01ca24f
......@@ -15,7 +15,15 @@ module.exports = function Page(browser) {
};
this.getTodoListXpath = function () {
return '//ul[@id="todo-list"]';
return this.findFirstExisting(
webdriver.By.xpath(),
webdriver.By.css('ul.todo-list'))
.then(function (elm) {
if (elm.getAttribute('id') === 'todo-list') {
return '//ul[@id="todo-list"]';
}
return '//ul[@class="todo-list"]';
});
};
this.xPathForItemAtIndex = function (index) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment