You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Choose Project SDK and Project language level according to your JDK
49
-
3. Click Modules > + > Import Module, point to automation folder
50
-
4. Click Libraries > + > Java, point to automation folder
51
-
52
-
## Setup:
53
-
1. Open with Intellij IDEA
54
-
2. Open device.xml
55
-
3. Arrange according to your device
56
-
57
-
### You can get the UD/ID device with command on command prompt:
58
-
```
59
-
adb devices
60
-
```
61
-
62
-
## Run the automation:
63
-
1. Open with Intellij IDEA
64
-
2. Right click device.xml > Run
1
+
# Selenium-Java-using-POM-without-PageFactory
2
+
3
+
## 1. POM
4
+
5
+
This automation created using POM design pattern. What is POM? POM stands for Page Object Model. POM is a design pattern used to make automation. Where each page an application or website is used as its own class. This gives an advantage when one of a page's interface changes, then other classes will not be affected.
6
+
7
+
## 2. Cucumber dan Gherkin
8
+
9
+
Then for Scenario scripting, we will use Cucumber and Gherkin.<br/>
10
+
What is Cucumber? What is Gherkin?<br/>
11
+
**Cucumber** is a tool that supports BDD *(Behavior-Driven Development)*.<br/>
12
+
**Gherkin** is a set of grammar rules that makes plain text structured enough to be understood by Cucumber. Scenario scripts are written using Gherkin.<br/><br/>Referensi: https://docs.cucumber.io/docs/guides/overview/
Install Editor Intellij Idea Community and JDK in komputer.
27
+
28
+
## 5. Configuration
29
+
30
+
#### Windows
31
+
32
+
###### JDK 8
33
+
34
+
1. Right-click My Computer > Properties > Advance system settings > Environment Variables > PATH > Edit
35
+
2. Type `C:\Java\java-8\bin`
36
+
3. Click Save
37
+
38
+
#### Linux dan Mac OS
39
+
40
+
###### JDK 8
41
+
42
+
*Automatically set itself*
43
+
44
+
## 6. Project
45
+
46
+
#### Clone
47
+
48
+
Clone this repository using this command `git clone https://github.com/cahkla10/Selenium-Java-using-POM-without-PageFactory` in terminal or command prompt.
49
+
50
+
### Intellij IDEA Configuration
51
+
52
+
Open this automation using Intellij IDEA.
53
+
54
+
##### Project Setting
55
+
56
+
1. Click File > Project Structure
57
+
2. Make sure JDK 8 is selected in Project SDK
58
+
59
+
##### Plugin
60
+
61
+
1. Klik Preferences > Plugins
62
+
2. Search using keyword `cucumber for java`
63
+
3. Click Install
64
+
4. Repeat steps 2-3 for plugin `gherkin`
65
+
66
+
## 7. Package & Class
67
+
68
+
### Struktur Project
69
+
70
+
```
71
+
|-- test
72
+
|-- java
73
+
|-- helpers
74
+
|-- pages
75
+
|-- setups
76
+
|-- steps
77
+
|-- resources
78
+
|-- features
79
+
```
80
+
81
+
-`helpers` package for Runner class or other required class
82
+
-`pages` package for all page classes.
83
+
-`setups` package for all automation configuration.
84
+
-`steps` package for all page step definitions.
85
+
-`resources` package for all features or non java classes.
86
+
87
+
## 8. Running Automation
88
+
89
+
For running the automation, open Runner class and run it.
0 commit comments