Challenge Overview
Challenge Objectives
-
Create wrapper methods for the Protractor API in the Topcoder testing library
About the Application
Topcoder is in the process of automating the testing of the topcoder website. This challenge is part of creating a library that different topcoder applications will use when creating their automation scripts.
Technology stack
-
Node.js
-
TypeScript
Assets
Repo : https://github.com/topcoder-platform/topcoder-testing-lib
Branch : feature_create_wrappers
Detail Requirement
Write wrapper methods for the following protractor APIs. A few sample wrapper methods are written in each section for your reference. Please refer to https://www.protractortest.org/#/api for the APIs that need to be wrapped.
-
Locator APIs
Create your wrapper methods here: topcoder-testing-lib/src/utils/element-helper.ts
Create wrappers for both element and element.all. Example methods created for reference (getAllElementsByCss and getElementByCss)
Add an additional optional parameter TcElementImpl to the wrapper methods to enable element chaining. Please update existing wrapper methods to include this optional param. An example wrapper method getElementByClassName has been created for your reference
-
Element APIs
Create your wrapper methods here :
topcoder-testing-lib/src/tc-element.ts
topcoder-testing-lib/src/tc-element-impl.ts
A few methods have been created for your reference.
-
Expected Condition APIs
Create your wrapper methods here : topcoder-testing-lib/src/utils/browser-helper.ts
A few wrappers have already been created for your reference (Example : waitUnitilInVisibilityOf )