java - Serenity/Selenium browser closes immediately -


i using serenity bdd 1.53 , newest chrome driver. when tests running browser closes , selenium throws error "web driver exception: unknown error: jquery not defined".

i trying wait jquery load, result same time.

 public boolean waitforjsandjquerytoload() {     webdriver driver = getdriver();     webdriverwait wait = new webdriverwait(driver, 30);      // wait jquery load     expectedcondition<boolean> jqueryload = new expectedcondition<boolean>() {         @override         public boolean apply(webdriver driver) {             try {                 return ((long)((javascriptexecutor)driver).executescript("return jquery.active") == 0);             }             catch (exception e) {                 // no jquery present                 return true;             }         }     };      // wait javascript load     expectedcondition<boolean> jsload = new expectedcondition<boolean>() {         @override         public boolean apply(webdriver driver) {             return ((javascriptexecutor)driver).executescript("return document.readystate")                     .tostring().equals("complete");         }     };      return wait.until(jqueryload) && wait.until(jsload); } 

tried wait whole page load, same things happen.

    void waitforload() {     new webdriverwait(getdriver(), 30).until((expectedcondition<boolean>) wd ->             ((javascriptexecutor) wd).executescript("return document.readystate").equals("complete")); } 

the tests work on local vm, try test on external server problem occurs.

what reason problem?

edit: stack trace

 web driver exception: unknown error: jquery not defined (session info: chrome=60.0.3112.113) (driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=windows nt 6.1.7601 sp1 x86_64) (warning: server did not provide stacktrace information) command duration or timeout: 6 milliseconds 


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -