yandex-qatools / htmlelements

Html Elements is a Java framework providing easy-to-use way of interaction with web-page elements in web-page tests.
Other
271 stars 116 forks source link

HtmElement doesn't work with Selenium java-bindings 3.5.1 #139

Closed doctordrue closed 7 years ago

doctordrue commented 7 years ago

Invocation target exception throws when calling PageFactory.initElements(new HtmlElementDecorator(new HtmlElementLocatorFactory(driver)), this);

Stack-trace:

Caused by: java.lang.NoSuchMethodError: ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementFieldAnnotationsHandler.buildByFromFindBy(Lorg/openqa/selenium/support/FindBy;)Lorg/openqa/selenium/By;
    at ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementFieldAnnotationsHandler.buildByFromFindAnnotations(HtmlElementFieldAnnotationsHandler.java:49)
    at ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementFieldAnnotationsHandler.buildByFromHtmlElementAnnotations(HtmlElementFieldAnnotationsHandler.java:57)
    at ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementFieldAnnotationsHandler.buildBy(HtmlElementFieldAnnotationsHandler.java:28)
    at org.openqa.selenium.support.pagefactory.DefaultElementLocator.<init>(DefaultElementLocator.java:58)
    at org.openqa.selenium.support.pagefactory.AjaxElementLocator.<init>(AjaxElementLocator.java:58)
    at org.openqa.selenium.support.pagefactory.AjaxElementLocator.<init>(AjaxElementLocator.java:53)
    at ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementLocatorFactory.createLocator(HtmlElementLocatorFactory.java:35)
    at ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementDecorator.decorateWebElement(HtmlElementDecorator.java:93)
    at ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementDecorator.decorateTypifiedElement(HtmlElementDecorator.java:79)
    at ru.yandex.qatools.htmlelements.loader.decorator.HtmlElementDecorator.decorate(HtmlElementDecorator.java:55)
    at org.openqa.selenium.support.PageFactory.proxyFields(PageFactory.java:113)
    at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:105)
doctordrue commented 7 years ago

It seems org.openqa.selenium.support.pagefactory.AbstractAnnotations.buildByFromFindBy(FindBy) has been removed in Selenium 3.5.1

mgrybyk commented 7 years ago

yes, does anyone know how to fix it?

P.S. https://github.com/SeleniumHQ/selenium/commit/0b3018895b4cd1f6e7f398b98ecc8ce4cdd877a3

doctordrue commented 7 years ago

Hi, @mgrybyk. I created PR, it works for me this way. https://github.com/yandex-qatools/htmlelements/pull/140

mgrybyk commented 7 years ago

Thanks!

sorry, missed your another commit https://github.com/yandex-qatools/htmlelements/pull/140/commits/fbd6da292f670550cd9c266b589433f1b46368b9

doctordrue commented 7 years ago

@lanwen, Is anybody going to take care about deploying new version to mavem-central? It seems there is a problem with deploying job due to SonarQube server inaccessibility: http://ci.qatools.ru/job/htmlelements_master-deploy/40/

lanwen commented 7 years ago

@doctordrue Forgot to press the "release" button in sonatype. Sorry for that. Should sync now in few hours

lanwen commented 7 years ago

Closed via #139