-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1022 - Apply Automation test for Yas project
- add automation-ui/backoffice
- Loading branch information
Duy Le Van
committed
Sep 17, 2024
1 parent
2a0e5f2
commit 444822c
Showing
5 changed files
with
37 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,4 @@ public enum InputType { | |
this.serviceName = serviceName; | ||
} | ||
|
||
|
||
} |
25 changes: 25 additions & 0 deletions
25
automation-ui/backoffice/src/test/java/com/yas/automation/ui/pages/BasePage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.yas.automation.ui.pages; | ||
|
||
import org.openqa.selenium.JavascriptExecutor; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
|
||
public class BasePage { | ||
|
||
private final WebDriver webDriver; | ||
|
||
public BasePage(WebDriver webDriver) { | ||
this.webDriver = webDriver; | ||
} | ||
|
||
public void scrollDown() { | ||
JavascriptExecutor javascriptExecutor = (JavascriptExecutor) webDriver; | ||
javascriptExecutor.executeScript("window.scrollBy(0,document.body.scrollHeight)"); | ||
} | ||
|
||
public void scrollTo(WebElement webElement) { | ||
JavascriptExecutor javascriptExecutor = (JavascriptExecutor) webDriver; | ||
javascriptExecutor.executeScript("arguments[0].scrollIntoView(true);", webElement); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters