Closed linus-amg closed 9 years ago
i have 3 findElement, so i dont know which i need to fix, because i dont know which is the one which is not visible
I would start by looking at the stack
at Object.<anonymous> (/Users/lgubenis/projects/paper/test/index.coffee:7:7)
at Object.<anonymous> (/Users/lgubenis/projects/paper/test/index.coffee:1:1)
what is on line 1, line 7?
seems to be the first findElement in this case, the stack does not help much because line 7 is the drool.flow which contains the 3 findElement, line 1 requires drool
i commented the other 2 findElement (which kind of depend on the first one) and the error continues, so im trying to fix it now
sure ok, so when the element is async you will need to do something like this...
driver.wait(function() {
return driver.findElement(drool.webdriver.By.css('#new-todo')).click()
.then(function() { return true; })
.thenCatch(function() {
return false;
})
}, 5000);
which will wait until the click works
:sparkles: for more reading: https://github.com/tastejs/todomvc/pull/1371 :sparkles:
okay, another question.. if i hide the $el of a Marionette ItemView onRender, should the findElement still find it? (its not finding it and im finding out why)
it should be able to find it, however it will not be able to interact with it since it is not visible.
:zap:
is there an easy way to access the App scope so i could trigger the request by calling it instead of triggering through a click on the element?
i would like to call App.Document.request('addPage')
its because the add button is hidden until you scroll near bottom of the page, i could also live with scrolling down before findElement + click, but i dont know how yet, to scroll with the driver
i guess its just another findElement with .scrollTo instead of .click
driver.executeScript("console.log('wow');")
thx :+1:
going to close, as this does not seem to be a drool question feel free to join the chat https://gitter.im/samccone/drool