I am testing that a bar is correctly fixed at the bottom of the screen by testing that it is positioned at window().getSize().height - bar.height. The code looks like this (I'm using the Nemo Selenium wrapper)
nemo.view._waitVisible('id:my-id').getLocation().then(pos => {
nemo.driver.manage().window().getSize().then(wSize => {
pos.y.should.equal(wSize.height - 75);
})
})
where 75 is the height of my bar. However, when I run this I'm getting that pos.y is 886, but wSize.height - 75 is 980. I can definitely verify that the bar is located where it's supposed to be when the Selenium Firefox window opens, so I'm guessing that the values of window().getSize() and/or getLocation() aren't returning exactly what I think they do, and I can't seem to find documentation on it.
Aucun commentaire:
Enregistrer un commentaire