Closed ttdmayshark closed 6 years ago
It can cause to additional unhandled errors during extracting region from an element. Eyes wrapper for WebElement contains some additional methods which used in our SDK later.
To get EyesRemoteWebElement instead of WebElement, you should use a driver which returns after eyes.open() method, the driver contains a lot of methods starting from findElement... all of them returns wrapped element which acceptable by the method.
okay @astappev -- the documentation in the library still says that WebElement is acceptable. Is there updated documentation somewhere? Do you have example code?
There is example how to use new check
interface to capture region by element. I will suggest this method.
Other possible solutions
eyes.checkRegionByElement(By.id("overflowing-div"))
eyes.checkRegionByElement(driver.findElement(By.id("overflowing-div")))
in the case driver
object should be object resolved after eyes.open
method, like there.
Okay, thanks. Note that the method docs here appear to be out of date: https://github.com/applitools/Eyes.Selenium.JavaScript/blob/master/src/Eyes.js#L583
I'm set, feel free to close this
Thanks @ttdmayshark
This needs to be merged for
eyes.checkRegionByElement
and similar functions to work. Otherwise, trying to do this:raises an error:
One further note: this commit looks like what broke it, so if there was a reason there perhaps you have more context than I do: https://github.com/ttdmayshark/Eyes.Selenium.JavaScript/commit/d20dabe9ab6cc6b77201f15e3c21eee10e6be4b3#diff-5a3ba2410ee7605d890a1b491c9ad788L418