-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScoreBoardAction.java
30 lines (21 loc) · 1.01 KB
/
ScoreBoardAction.java
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
package com.fs.app.automation.page.action;
import com.fs.app.automation.ActionUtils.ActionUtils;
import com.fs.app.automation.page.object.HomePageObjects;
import com.fs.app.automation.page.object.ScorePageObjects;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
public class ScoreBoardAction extends ScorePageObjects {
public static void clickScoreBtn() {
ActionUtils.clickBy(HomePageObjects.scoreBoardBtn);
ActionUtils.takeScreenShot("ScoreBoard");
}
public static void selectSport(String sport) {
//By byDropdownHeader = ScorePageObjects.selectSportDropdown;
WebElement byDropdownHeader = ActionUtils.findElementBy(ScorePageObjects.selectSportDropdown);
By byDropdownValue = ScorePageObjects.selectSportFromDropdown;
String sportToSelect = sport;
ActionUtils.waitAndClick(byDropdownHeader);
ActionUtils.selectfromDropdown(byDropdownValue, sportToSelect);
ActionUtils.takeScreenShot("SportSelection"+sport);
}
}