In one of my tests I have the mouse moved to a specific location and then clickMouseButton()
is called. This action is to change the data that is displayed (paging the data.) However, after the click, when I try to get the text in a column of the table to verify that the data changed the data changes back to what was originally displayed and my test fails. My test code is:
return Remote
.moveMouseTo(JE.Buttons.Scrolling(), 5, 100)
.clickMouseButton()
.end(Infinity)
.sleep(500)
.findByXpath('//*[@id="vwNJEAll_grid_header_tbody"]/tr[2]/td[2]/div')
.getVisibleText()
.then(function (result) {
expect(result).not.to.equal(firstSeenJENumber);
});
The code behind JE.Buttons.Scrolling()
is:
return Remote
.setFindTimeout(5000)
.findByXpath('//*[@id="vwNJEAll_grid_table_container"]/div[2]/div');
It really seems to me like the locator in Leadfoot is binding to what is on the page when it first loads. Is this the case, and how should I go about getting what I need to happen? I have no other explanation for this, but hopefully you do.