我已安排Windows任务调度程序以Firefox浏览器作为后台进程运行selenium驱动程序 .
为此,我启用了"Run whether the user is logged in or not",它运行正常 .
现在,HTML5中实现的一个登录页面并没有在后台进程中工作,当java进程到达此行时出现以下错误“ driver.findElement(By.id("userName")).clear();

Exception :org.openqa.selenium.ElementNotVisibleException:元素当前不可见,因此可能无法与命令持续时间或超时交互:86毫秒

但是,在后台进程中没有HTML5的情况下,同一页面工作正常 .

Note :如果我在没有"Run whether the user is logged in or not"选项的情况下运行调度程序,则在HTML5中实现的登录页面运行良好(UI模式,即不作为后台进程)

我使用以下链接创建了这份工作:
Selenium - Using Windows Task Scheduler vs. command line

S / f详细信息:

Windows Server 2012 R2 Standard
FireFox 41.0.1
Selenium Java version 2.45.0