| 3 | import com.force.base.ProjectHooks; |
| 4 | |
| 5 | public class HomePage extends ProjectHooks{ |
| 6 | |
| 7 | public HomePage clickAppLauncher() { |
| 8 | click(".slds-icon-waffle", "App Launcher", "Icon"); |
| 9 | return this; |
| 10 | } |
| 11 | |
| 12 | public HomePage clickViewAll() { |
| 13 | click("(//button[text()='View All'])[1]", "View All"); |
| 14 | return this; |
| 15 | } |
| 16 | |
| 17 | public HomePage typeSearchApps(String appName) { |
| 18 | type("(//input[@placeholder='Search apps or items...'])[1]", appName, "Search Apps"); |
| 19 | return this; |
| 20 | } |
| 21 | |
| 22 | public HomePage clickApp(String appName) { |
| 23 | click("(//span[text()='All Apps']/following::mark[text()='"+appName+"'])[1]", appName); |
| 24 | return this; |
| 25 | } |
| 26 | |
| 27 | public HomePage clickLeftMenu(String menuName) { |
| 28 | click("//a[text()='"+menuName+"']", menuName, "Menu"); |
| 29 | return this; |
| 30 | } |
| 31 | |
| 32 | public HomePage clickLeftSubMenu(String mainMenuName, String subMenu) { |
| 33 | click("//a[@class='slds-tree__item-label' and text()='"+mainMenuName+"']/following::a[text()='"+subMenu+"']", subMenu, "Sub Menu"); |
| 34 | return this; |
| 35 | } |
| 36 | |
| 37 | } |
| 38 |
nothing calls this directly
no outgoing calls
no test coverage detected