-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImportantNote.txt
More file actions
31 lines (24 loc) · 1.49 KB
/
ImportantNote.txt
File metadata and controls
31 lines (24 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Used in this project -
NgWebdriver
Screenshot
Exception handeling
TestNg
###################### For new script, do following steps ######################
Step 1 = Create a testNG class.
Step 2 = Create a class with the name of your activity in an "activity" package -
Step 3 = In activity class :
3.1 Create a method with the name of your activity with prefix "do"
Pass webdriver's object to it.
3.2 Create object/objects of page/pages(which contains constructor and findby... methods) of which our script is going to execute
(before this, create the class with the name of page-name in package : "pages".
this class will contain the findByXpathAndClick, findByNameAndClick methods and parameterized constructor of that class
pass reference of "webdriver" class as parameter)
3.3 Do scenario of clicking, sendkeys.. etc etc, by using object/objects created in above step
Create separate methods in activity class by clubbing chunks of code which will be usefull for "doActivity" method id activity class
Step 4 = Use try catch for the object/objects creation and for scenario separately.
Step 5 = After scenario, write below syntax for Log and Screenshot :-
Common.WriteToFile();
Step 6 = In SeleniumTLS.xml, make entry of our new testNG class for the execution.
Step 7 = Make sure the syntax for concurrent or sequential running of all testNG classes.
add try catch for all methods
##################################################################################