This is a big project that uses Selenium to automate the process according to the checklist provided by the Professor. The project is divided into 2 parts:
- Part 1: Basics
- Part 2: Advanced
docker exec -it selenium-docker-sandbox-ubuntu-1 bash
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-arm64
export PATH=$JAVA_HOME/bin:$PATH
VNC: http://localhost:8081/vnc.html
-
Part 1: Basics
- Fill simple form and send (eg. Login)
- Form sending with user
- Logout
- Fill input (text,radio,check...)
- Send a form
- Static Page test
- Multiple page test from array (easily extendable static page tests)
- complex xpath (eg. //div//a[@href='asd'])
- Filling or reading textarea content
- Filling or reading drop-down
- Filling or reading Radio button
- At least 4 class
- At least 6 class
- At least 8 class
- Explicit wait
- Reading the page title
- Page object pattern
- BasePage object class
- Test suite looks like readable test description
-
Part 2: Advanced
- WebDriver configuration (modify something in the browser options)
- Manipulate cookie meaningfully (without ui), e.g. avoid showing up consent popup without clicking onto it
- Hover test
- Drag&Drop
- File Upload
- History test (browser back button)
- Test case dependencies
- E-mail checking (eg. Registration with activation e-mail): Unable to do this because of the Captcha
- Test with random data
- Download multiple files to a folder from an user protected page: Unable to do this because the chrome version is too old
- Using configuration file
- JavascriptExecutor
Task | Description |
---|---|
Fill simple form and send (e.g., Login) | Login form |
Form sending with user | Business adr Password change Rollback password change |
Logout | logged two times after the cookies setting after the end of the |
Fill input (text, radio, check...) | password, email and many other fields |
Send a form | Login form |
Static Page test | Convert,Compress, Edit pages |
Multiple page test from array | Convert,Compress, Edit pages |
Complex xpath | Can be found in locators helper |
Filling or reading textarea content | Business adr |
Filling or reading drop-down | Account and Pdf tools dropdowns |
Filling or reading Radio button | remember me |
At least 4 class | atLeast4Locator |
At least 6 class | atLeast6Locator |
At least 8 class | atLeast8Locator |
Explicit wait | wait.until(ExpectedConditions.urlMatches for uploadFile and in many other places mainly using the 2 helper methods from SeleniumHelper |
Reading the page title | getPageTitle() from BasePage |
Page object pattern | Please check the project structure |
BasePage object class | all pages are extending BasePage |
Test suite looks like readable test description | Occured in many places in the code |
For the "Advanced" tasks:
Task | Description |
---|---|
WebDriver configuration | in a method called getOptions inside SeleniumHelper |
Manipulate cookie meaningfully | used existing token to login. read cookies to check if the user is authenticated |
Hover test | Hover over pdf tools dropdown and user account icon to logout |
Drag & Drop | Drag the pen icon inside the Edit Page to the draggable area of the file upload Drag and drop follows the mouse Tried 5 ways to do it, most follow the cursor, some didn't work . |
File Upload | Upload the file "resources/file1.gif" to the website |
History test | navigateBack() from Viewer to Pdf Editor page |
Test case dependencies | Occured in many places in the code |
E-mail checking | Unable to do due to the Capcha challenge |
Test with random data | Random password and email generated using SeleniumHelper |
Download multiple files to a folder | File upload code is correct and expected to work but Unable to do due to the chrome not supporting the website |
Using configuration file | can be found inside config/configs.json |
JavascriptExecutor | used to Scroll inside the compress page bypass the GBC consent in the home page |
For the "Goals" tasks:
Task | Description |
---|---|
Readable code (Every function name describe what the function is doing) | Structure code, used relevant attributes and methods names, and respected the Java naming convention |
Structured (Organized in classes and functions) | Please check the project structure |
Unnecessary files ignored well | all added to .gitignore |
Low redundancy (There are only a few of duplications of code) | Redundant code refactored and moved to its respective helper |