Возникает проблема с проходом теста на PhantomeJS, в то время как аналогичный тест на Firefox проходит без проблем.
try {
wd.get(“https://www.kharkovforum.com/login.php?do=logout”);
} catch (TimeoutException ignore) {
System.out.println(“==============”);
}wd.findElement(By.className(“button”));
System.out.println(“111111111”);User user = new User();
wd.findElement(By.id(“navbar_username”)).sendKeys(user.getName());
wd.findElement(By.id(“navbar_password”)).sendKeys(user.getPassword());
wd.findElement(By.className(“button”)).click();
System.out.println(“22222222”);wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText(user.getName())));
WebElement el = wd.findElement(By.linkText(user.getName()));
el.click();
System.out.println(“333333”);
Вот ошибки в консоли
22222222
[ERROR - 2017-11-21T17:59:51.865Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1511287191810
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-11-21T17:59:52.805Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1511287192781
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-11-21T17:59:53.777Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1511287193734
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-11-21T17:59:54.722Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1511287194686
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-11-21T17:59:55.524Z] Session [c33fcb20-cee5-11e7-8b61-4b1689bcf40c] - page.onError - msg: TypeError: null is not an object (evaluating ‘this.tobj.value=live_search’)
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-11-21T17:59:55.524Z] Session [c33fcb20-cee5-11e7-8b61-4b1689bcf40c] - page.onError - stack:
AJAX_LiveSearch_Init (https://www.kharkovforum.com/clientscript/ajax_live_search_init.js?v=387:7)
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-11-21T17:59:56.572Z] Session [c33fcb20-cee5-11e7-8b61-4b1689bcf40c] - page.onError - msg: TypeError: null is not an object (evaluating ‘this.tobj.value=live_search’)
phantomjs://platform/console++.js:263 in error
[ERROR - 2017-11-21T17:59:56.572Z] Session [c33fcb20-cee5-11e7-8b61-4b1689bcf40c] - page.onError - stack:
AJAX_LiveSearch_Init (https://www.kharkovforum.com/clientscript/ajax_live_search_init.js?v=387:7)
phantomjs://platform/console++.js:263 in error
333333
В чем тут проблема?