Selenium webdriver 对Safari运行量角器测试时WebDriverError

Selenium webdriver 对Safari运行量角器测试时WebDriverError,selenium-webdriver,safari,protractor,cucumber-serenity,serenity-js,Selenium Webdriver,Safari,Protractor,Cucumber Serenity,Serenity Js,首先,非常感谢你的帮助。我一直在用谷歌搜索可能的解决方案,但找不到任何线索 我正在尝试使用SerenityJS框架运行一些UI测试,它是位于量角器之上的一层 我的dragrator.config.js如下所示: const cwd=process.cwd(); const modules=`${cwd}/node_modules`; const glob=require(`${modules}/glob`); 常量量角器=require.resolve(`${modules}/paragrat

首先,非常感谢你的帮助。我一直在用谷歌搜索可能的解决方案,但找不到任何线索

我正在尝试使用SerenityJS框架运行一些UI测试,它是位于量角器之上的一层

我的dragrator.config.js如下所示:

const cwd=process.cwd();
const modules=`${cwd}/node_modules`;
const glob=require(`${modules}/glob`);
常量量角器=require.resolve(`${modules}/paragrator`);
常量量角器\u节点\u模块=量角器.substring(0,量角器.lastIndexOf('node\u模块')+'node\u模块'.length);
const seleniumJar=glob.sync(`${cwd}/${dragrator\u node\u modules}/dragrator/**/selenium server standalone-*.jar`).pop();
const-appiumCapabilities=require(“./appium-capabilities”);
const dashboardTestRootDir='dashboard';
const useprapher=process.env.摄影师;
让configObject={};
configObject={
seleniumServerJar:seleniumJar,
//看https://github.com/angular/protractor/blob/master/docs/timeouts.md
所有脚本时间:11*1000,
禁用检查:正确,
//看https://github.com/protractor-cucumber-framework/protractor-cucumber-framework#uncaught-例外情况
ignoreUncaughtExceptions:true,
框架:“自定义”,
frameworkPath:require.resolve(`${modules}/serenity js`),
宁静:{
阶段性超时:30*1000,
},
规格:[`${cwd}/features/***/.feature`],
黄瓜:{
要求:[
//加载步骤定义:
`${cwd}/features/***.ts`,//类型脚本
`${cwd}/features/***.js`//JavaScript
],
格式:“漂亮”,
编译器:“ts:ts节点/寄存器”
},
};
if(cwd.includes(仪表板TestRootDir)){
configObject.multiCapabilities=appiumCapabilities['MultiBrowser'];
//这需要在多容量中按顺序运行,即一次运行一个浏览器
configObject.maxSessions=1;
configObject.onPrepare=函数(){
//获取浏览器名称
browser.getBrowserName=函数(){
返回browser.getCapabilities().then(函数(caps){
browser.browserName=caps.get('browserName');
browser.manage().window().maximize();
}
)}
//解析浏览器名称,以便获取浏览器名称。
getBrowserName();
}
}

exports.config=configObject我刚刚发现,事实上,这是因为当单击发生时,测试在DOM未准备就绪的地方进行得太快(某些元素只有在填写某些字段时才可单击),因此无法执行操作

当用户名和密码填写完毕后,我在单击之前发出了等待,当DOM在等待后完全加载时,我不再有异常