我在chrome上运行我的量角器自动化脚本。我必须在我的脚本中将一个循环中的大数据发送到网站上的输入框。数据在json文件中。 我正在使用" directConnect:true"在我的配置文件中。 配置文件是这样的: exports.config = { directConnect:true, 规格:[' ./ RegressionV1_suite / elementCheck.js'], 能力:{ ' browserName':' chrome',
chromeOptions: {
args: [ 'lang=en' ],
prefs: {
intl: { accept_languages: "en" },
},
},
},
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 60000000
},
allScriptsTimeout: 10000,
};
Json file is like this:
{
"Questions":
[
"issues in taleo",
"Taleo",
"taleo is not working",
"taleo password reset",
"getting error in taleo",
"Need access to plant in sap",
"Modification of access in existing application access",
"Reinstate access of any application in-case of non usage of application from a long time",
"SAP T-code authorization",
"I m a new employee & need access to my computer & cemex applications",
"Need access to different plants in SAP/APEX/Command",
"Need access to application",
"Unable to access application",
"Authorization error",
"need access to command",
"need access to APEX",
"need access to sap prd",
"need access to cemex connect",
"need access to active suite",
"need access to loadmaster",
"need access to kronos",
"need access to business objects",
"need access to SAP BP1",
"need access to SAP CRM",
"need access to Lotus Notes",
"need access to SAP HR",
"I need access for",
"how do I get access",
"want access rights",
"want access",
"need access rights",
"need access",
"application access",
"I want admin rights",
"I want more access rights",
"I want some different rights on application",
"modify my access rights",
"my access rights got reinstated",
"reinstate access rights",
"security request form",
"calendar in outlook",
"create profile in outlook",
"not able to send emails in outlook",
"reset outlook password",
"schedule meeting in outlook",
"how do i reset outlook password",
"chax",
"How do I install chax",
"I have issues with chax",
"I need help with Chax",
"Install chax",
"how do I get webex",
"how do I signup for webex",
"I do not have webex account",
"new account in webex",
"request webex access",
"webex create account",
"Device not authorised",
"Unable to install AFARIA",
"need help signing BYOD Policy",
"BYOD Policy Sign",
"BYOD Policy",
"setup emails on phone",
"how to access emails on phone for the first time",
"I'm not able to install AFARIA",
"not able to access emails on phone",
"Bring your own device policy sign",
"calling card",
"How to order business cards",
"How to order cemex stationary",
"order business cards",
"Order stationary",
"stationary",
"need help with stationary",
"business cards",
"stationary and business cards",
"order stationaries",
"stationaries",
"Eplan is giving error",
"eplan is not working",
"I have issues with eplan",
"I'm getting error when trying to submit vehicle mileage",
"not able to report vehicle mileage",
"Password reset for eplan"
]
}
从json file命令调用此数据的spec文件是这样的: 元件(by.id(' questionInput&#39))的SendKeys(问题);
:此"问题"只是来自上面指定的json的数据。对于每个循环,从json中挑选一个问题并在自动化脚本中作为输入发送。 最初问题是快速发送的,在30/40问题后输入框中输入问题的速度会降低。问题会逐字逐句输入,增加执行时间。 提到这些: https://sqa.stackexchange.com/questions/13919/selenium-webdriver-for-chrome-too-slow SendKeys() in selenium is too slow while typing words into a text box
谷歌浏览器版本 - 61.0.3163.100(32位) 量角器版本-5.1.1 npm版本-3.10.10
任何人都可以帮助我!