Medium | Topcoder Skill Builder Competition | Appium | Your First Automation Test Script [500 Points]

Key Information

Register
Submit
Competition Timeline

Timezone:Etc/UTC

Registration

Starts

May 03, 2021

13:34

Ends

May 31, 2021

13:34

Submission

Starts

May 03, 2021

13:43

Ends

May 31, 2021

13:45

Review

Starts

May 31, 2021

13:45

Ends

Jun 01, 2021

16:51

Appeals

Starts

Jun 01, 2021

16:53

Ends

Jun 01, 2021

16:56

Winners Announced

Jun 01, 2021

17:02

Challenge Overview

Your First Automation Test Script

This is the 500 points medium level problem of Topcoder Skill Builder Challenge: Appium.

For more challenge context info Register for the Host Competition before submitting a solution to this problem.

Solving this problem you learn:

  • Install Appium and set the Desired Capability/Environment Variables.

  • Extract the DOM ( locater ) from Appium inspector.

  • Basic In/outflow of Appium technology. 

Learning Resources: 

Appium Documentationhttp://appium.io/docs/en/about-appium/intro/

Appium Desired Capabilitieshttp://appium.io/docs/en/writing-running-appium/caps/

Appium Setup Windows/macOS and to connect Android Device: Go here Resources 

If you have any questions, doubts or any other learning resource you find please post it in the forums.

What do you need to do?

In this problem, your task is to write your first automated test script for the famous team collaboration app known as SlackSlack is a workplace communication tool, a single place for messaging, tools and files.

The App is available on both Android and iOS and you can choose either of them and write the automated scripts for the test cases mentioned below:

 1.  Open App From Script.

  • Install and set up your Environment, please go to this challenge if you have not set up yet.

  • Create a project based on your programming language and install the respective  Appium Client Library 

  • Set the Desired Capabilities and Run the program.

Here is the example, for the NodeJS project with WebdriverIO Client Library.

            Prerequisite: Appium Environment and Nodejs have already been set up.

  • Create a node project: npm init -y

  • Install webdriverio: npm install webdriverio

  • Create index.js file and add the below script with your desired capabilities.

  • const wdio = require("webdriverio");

  • const assert = require("assert");

  • const opts = {

  •  path: '/wd/hub',

  •  port: 4723,

  •  capabilities: {

  •    platformName: "Android",

  •    platformVersion: "8",

  •    deviceName: "Android Emulator",

  •    app: "/Users/deepakthapa/Desktop/appium/ApiDemos-debug.apk",

  •    appPackage: "io.appium.android.apis",

  •    automationName: "UiAutomator1"

  •   }

  • };

  • async function main () {

  •  const client = await wdio.remote(opts);

  •   await client.deleteSession();

  • }

  • main();

Note: Here you need to update desired capability according to your device/App configuration. 

  • Run this command: node index.js

  • Expected outcome:  App will open and close on your Real Device/Emulator/Simulator (eg. https://monosnap.com/file/kVvbhQVoRXyaUfFdx4taYocLolGUcD)

  • Note: Make sure you have opened the Appium server, Emulator/Simulator or connected on a Real device before executing the code. For more details please go here.

2.  Write your First Appium Test Script ( Login to Slack App)

  • Tap on the `SIGN' In` button.

  • Tap on `I'll sign in manually`

  • Enter Workspace URL as https://skillbuilderworkspace.slack.com/ 

  • Tap on Next Button.

  • Enter the Email address as mailmemakar@gmail.com

  • Enter Password as Topcoder@123

  • Tap on Next

  • Expected Outcome: User should successfully log in and land on the main screen.

3. Task 3 : 

  • Set Screen Orientation to LANDSCAPE view. Here is a reference .

  • Take and Save the screenshot to the current root folder of the solution. 

Here is the sample source code for your reference purpose of this challenge.

Instructions

  • We have prepared three problems: Easy, Medium, and Hard, which are worth 250, 500, 1000 points respectively. Points are based on the difficulty of the problem.

  • The competitions may or may not be related to each other.

  • The links to the problems/competitions are provided below.

Problems



Final Submission Guidelines

Submit a Zip with

  • Screenshot or a video verification file(in Gdirve).

  • Source code with deployment guide.

ELIGIBLE EVENTS:

2021 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30181602