Pages

functions available in protractor

What are the functions available in protractor?

Below is code snippet was written by using available functions in protractor
Note: click above each link to learn.

beforeAll(function () {
    console.log("BeforeAll block executed - declared outside of describe blocks");
});
beforeEach(function () {
    console.log("before each block executed - declared outside of describe blocks");
});
describe('First describe block', function () {
    beforeAll(function () {
        console.log("BeforeAll block executed - declared inside of describe block");
    });
    beforeEach(function () {
        console.log("before each block executed - declared inside of describe blocks");
    });
    it('First Test case - First describe block ', function () {
        console.log("First Test case in First describe block");
    });
    afterEach(function () {
        console.log("after each block executed - declared inside of describe blocks");
    });
    afterAll(function () {
        console.log("afterAll block executed - declared inside of describe blocks");
    });
});
afterEach(function () {
    console.log("after each block executed - declared outside of describe blocks");
});
afterAll(function () {
    console.log("afterAll block executed - declared outside of describe blocks");
});
Output:
functions or blocks in protractor
protractor functions
Please comment below to feedback or ask questions.

No comments:

Post a Comment

Please comment below to feedback or ask questions.