在运行命令' Protractor conf.js'我收到错误加载配置文件失败。我无法纠正它。下面是配置文件和测试用例文件代码。
conf.js:
describe('LockTest', function() {
it('LockTheScenarioTest', function() {
var reportsTest = element(by.repeater('row in BaseCollection').row(0));
reportsTest.element(by.id('22090')).click();
reportsTest.element(by.id('22090')).element(by.xpath('following-sibling::ul')).click();
browser.sleep(4000);
browser.waitForAngular();
element(by.buttonText('Ok')).click();
expect(element(by.binding('signInName')).getText()).
toEqual('Pratham Nagabhushan');
});
});
待办事项-spec.js
private SpannableString addClickablePart(String string) {
string = string.replaceAll("\\n"," \n ");
string += " ";
SpannableString ss = new SpannableString(string);
String[] words = string.split(" ");
for (final String word : words) {
if (CommonUtilities.isValidURL(word)) {
int lastIndex = 0;
while(lastIndex != -1){
lastIndex = string.indexOf(word+" ",lastIndex);
if(lastIndex != -1){
ClickableSpan clickableSpan = new ClickableSpan() {
@Override
public void onClick(View textView) {
//use word here to make a decision
isRefreshingNecessary = false;
Intent mIntent = new Intent(ctx, UserWebsiteActivity.class);
mIntent.putExtra("website", word);
startActivity(mIntent);
}
};
ss.setSpan(clickableSpan, lastIndex, lastIndex + word.length(),
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
lastIndex += word.length();
}
}
}
}
return ss;
}
我不确定因为它无法工作。请提出可能问题的建议。