yandex-qatools/htmlelements

HtmElement doesn't work with Selenium java-bindings 3.5.1

doctordrue opened this issue · 7 comments

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)

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

yes, does anyone know how to fix it?

P.S.
SeleniumHQ/selenium@0b30188

Hi, @mgrybyk. I created PR, it works for me this way. #140

Thanks!

sorry, missed your another commit
fbd6da2

@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/

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

Closed via #139