我在使用下面的代码时不断收到,stale element reference exception
所以我决定添加一个try/catch
块。我仍然收到此错误。我的try/catch
块写不正确吗?
it 'should test cells updated correctly', ->
try
element(By.css('#D6'))
console.log('try')
catch staleElementException
console.log('catch')
element(By.css('#D6')).click().then ->
expect(element(By.css('div.gc-formula-input')).getText()).toBe 'hello'