WileyLabs / teasy

Test easy with Teasy - UI automation testing framework
MIT License
31 stars 31 forks source link

[NullTeasyElement] added public getter of elementData #200

Closed dstepkin-wiley closed 5 years ago

dstepkin-wiley commented 5 years ago

it is still possible to waitFor().displayed() even if the actual element was NullTeasyElement

so, main usage will be:

  1. wrap block around TeasyElement (doesn't matter whether it is Null or Visible element)
  2. to be able to use fluent interface for cases like: new Block(myTeasyElement).waitForBlockIsDisplayed().checkSomething();

currently it is impossible since main element of the block is 'final' and if it was instance of NullTeasyElement checkSomething() method will fail (throw NotFoundElException).

the idea is to perform additional lookup after waitForBlockIsDisplayed() and return new instance of the block with new element found by the same locator in the same context as initial NullTeasyElement