cnishina on selenium4
chore(release): bumpb version t… (compare)
count
capability - like it can't tell the difference between the tests. count: 2
runs a test twice, and a jasmine reporter will output 2 specStarted
's, but they have the same id :/ (so later if I wanted to associate the test's specDone
or other jasmine output back to the same test, I couldn't){
"id": "spec0",
"description": "",
"fullName": "",
"failedExpectations": [],
"passedExpectations": [],
"pendingReason": ""
}, {
"id": "spec0",
"description": "",
"fullName": "",
"failedExpectations": [],
"passedExpectations": [],
"pendingReason": ""
}
{"id":"spec0","description":"should add one and one","fullName":"Protractor Demo App should add one and one","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
{"id":"spec1","description":"should add one and two","fullName":"Protractor Demo App should add one and two","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
{"id":"spec2","description":"should add one and three","fullName":"Protractor Demo App should add one and three","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
{"id":"spec3","description":"should add one and Four","fullName":"Protractor Demo App should add one and Four","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
{"id":"spec4","description":"should add one and five","fullName":"Protractor Demo App should add one and five","failedExpectations":[],"passedExpectations":[{"matcherName":"toEqual","message":"Passed.","stack":"","passed":true}],"pendingReason":"","status":"passed"}
// .spec.ts file
describe('example test', () => {
process.env.instanceId = generateGuid();
console.log('describe instanceId: ' + process.env.instanceId);
it('run test steps', () => {
// do stuff
});
});
// jasmine reporter
export class CustomJasmineReporter implements CustomReporter {
specStarted(data: any) {
data.instanceId = process.env.instanceId;
console.log(`specStarted: ${JSON.stringify(data)}`)
}
specDone(data: any) {
data.instanceId = process.env.instanceId;
console.log(`specStarted: ${JSON.stringify(data)}`)
}
}
Hi All, I am new to protractor - automation testing. I am following protractor website to do create few dummy tests.
Problem statement: i don't see line number when any test case fails
for eg:
D:\ProtractorDeltaPOC>protractor conf.js
[07:53:44] I/launcher - Running 1 instances of WebDriver
[07:53:44] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[07:53:51] I/launcher - 0 instance(s) of WebDriver still running
[07:53:51] I/launcher - chrome #01 failed 1 test(s)
[07:53:51] I/launcher - overall: 1 failed spec(s)
[07:53:51] E/launcher - Process exited with error code 1
in the above code, it says test is failed but there are no reference. Can someone help me.
@vnvbsudhakar , like this
npm config set https-proxy http://"username:password"@proxy.company.com:8080
my spec file is
describe("Launch browser", function(){
browser.get('http://freecrm.com/')
})
my conf file is
exports.config = {
framework: 'jasmine2',
// seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['tests/asyncFix.js'],
}
this is the log in terminal
[18:05:05] I/launcher - Running 1 instances of WebDriver
[18:05:05] I/local - Starting selenium standalone server...
[18:05:07] I/local - Selenium standalone server started at http://192.168.137.1:53801/wd/hub
Started
No specs found
Finished in 0.004 seconds
[18:05:11] I/local - Shutting down selenium standalone server.
[18:05:11] I/launcher - 0 instance(s) of WebDriver still running
[18:05:11] I/launcher - chrome #01 passed
Always I get No specs found and tests are not executing
Dear All,
Can someone check my code and tell me, please, why isSelected returning 'false'?
it("Filter Test", function(){
browser.get("https://www.osianama.com/indian-asian-antiquities-arts/armour-helmets");
let artwork = element(by.xpath("//div[@class='c-btn form-control'][span[text()='Artwork Title']]")).click();
browser.sleep(3000);
let checkbox = element(by.xpath("//label[text()='Akoda-Nari Kabuto (2)']"));
checkbox.click();
expect(checkbox.isSelected()).toBe(true);
}); // end of it
--changedSince
or --onlyChanged
?