scala - FluentWait prints a lot of warning stack traces for ignored exception in the console when I upgrade Selenium from 3.0.1 to 3.1.0 -
i have following method use intensively in tests , works ok selenium 3.0.1
def waituntilvisiblebyxpath(xpath:string, timeoutinmillis:int)(implicit driver:webdriver): try[webelement] ={ val wait:fluentwait[webdriver] = new fluentwait(driver) .withtimeout(timeoutinmillis, timeunit.milliseconds) .pollingevery(100, timeunit.milliseconds) .ignoring(classof[nosuchelementexception]) .withmessage(s"for element visible , enabled xpath: $xpath") val condition:expectedcondition[webelement] = expectedconditions.elementtobeclickable(by.xpath(xpath)) try{wait.until(condition)} }
i've tried upgrade selenium 3.1.0 version , after noticed lot of stack traces similar 1 in console when running tests:
mar 28, 2017 1:41:49 pm org.openqa.selenium.support.ui.expectedconditions findelement warning: webdriverexception thrown findelement(by.xpath: //a[text()='log out']) org.openqa.selenium.nosuchelementexception: cannot locate element using by.xpath: //a[text()='log out'] documentation on error, please visit: http://seleniumhq.org/exceptions/no_such_element.html build info: version: '3.1.0', revision: 'b94c902', time: '2017-02-16 12:21:31 -0800' system info: host: 'positron', ip: '127.0.1.1', os.name: 'linux', os.arch: 'amd64', os.version: '4.4.0-66-generic', java.version: '1.8.0_121' driver info: driver.version: unknown @ org.openqa.selenium.support.ui.expectedconditions.lambda$findelement$0(expectedconditions.java:896)
so prints warning stack trace every time polls. it's not critical of course bloats console. explain how disable such warnings printed fluentwait-s , point out rationale behind such behavior?
i've set root logger level severe:
logmanager.getlogmanager.getlogger("").setlevel(level.severe)
that solved problem me.
Comments
Post a Comment