browser.execute(function () {
document.getElementsByClassName('vitara-point')[1].innerHTML = 'bar2'
}).assert.containsText('rect:nth-child(2)', 'bar2').moveToElement('rect:nth-child(2)', 2, 2).click('rect:nth-child(2)').pause(2000)
//bar3
//browser.execute(function(){document.getElementsByClassName('vitara-point')[2].innerHTML = 'bar3'}).assert.containsText('rect:nth-child(3)', 'bar3').moveToElement('rect:nth-child(3)', 2,2).click('rect:nth-child(3)').pause(2000)
Testing if element rect:nth-child(3) contains text 'bar3' in 5000ms - expected "contains text 'bar3'" but got: "does not contain 'bar3'" (5162ms)
I want to go next to the nth child 2nd element but for 2nd its working not for 3rd.