This file contains hidden or 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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This file contains hidden or 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
import org.testng.Assert; | |
import org.testng.annotations.Test; | |
public class SearchTests { | |
@Test | |
public void verifyIfSearchTermShowsRelevantResults() { | |
//Arrange | |
String searchItem = "Jeans"; | |
String searchKey = "Jean"; | |
LauncherPage launcherPage = new LauncherPage(webdriver); // Assume webdriver is created and // handy |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 2.
This file contains hidden or 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
Abbreviation, Generates a By statement to find locator using, Generated Code | |
mpf, Declare locators for multiple platforms - Android,iOS,Web, Responsive Web, MultiPlatformFinder locator = finder(queryByContentDesc("test-Username"), queryByName("test-Username")); | |
qba | |
attribute | |
private By locator = queryByAttribute("attribute", "value"); | |
qbc |
This file contains hidden or 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
Language | Votes | |
---|---|---|
Java | 43% | |
JavaScript | 35% | |
C# | 8.8% | |
Python | 8% | |
Ruby | 4.2% |
This file contains hidden or 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
stages: | |
- test | |
- allure | |
- deploy | |
.download_history: &download_history | |
after_script: | |
- apt-get install -y unzip | |
- mkdir backup && cd backup || true | |
- "curl --location --output report.zip --request GET \"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/master/download?job=pages\" --header \"Authorization: Bearer ${CI_DEPLOY_TOKEN}\" || true" |
This file contains hidden or 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
.download_history: &download_history | |
after_script: | |
- mkdir backup && cd backup || true | |
- "curl --location --output report.zip --request GET \"https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/master/download?job=pages\" --header \"Authorization: Bearer ${CI_DEPLOY_TOKEN}\" || true" | |
- (unzip report.zip) || true | |
- cd ../ | |
- (cp -r backup/public/history/ allure-results/history) || true |
This file contains hidden or 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
public class PageInitiator { | |
public static <T extends BasePage> T getPage(Class<T> tClass) { | |
Injector pageInjector = (Injector) Reporter.getCurrentTestResult() | |
.getAttribute(Constants.PAGE_INJECTOR); | |
T page = pageInjector.getInstance(tClass); | |
return (T) page.init(page); | |
} | |
public static <T extends BaseComponent> T getComponent(Class<T> tClass) { |
This file contains hidden or 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
@Guice(StaleHandlerModule.class) | |
public class LoginTest extends BaseTest { | |
@Inject | |
User userProvider; | |
@Test | |
public void userLogin() { | |
LoginPage loginPage = getPage(LoginPage.class); | |
User user = userProvider.init(); |
This file contains hidden or 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
public class LoginPage extends BasePage<LoginPage> { | |
@FindBy(name = "username") | |
private WebElement username; | |
@FindBy(name = "password") | |
private WebElement password; | |
@FindBy(css = "input[name ='submit']") | |
private WebElement loginBtn; |
This file contains hidden or 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
public abstract class BasePage<T> { | |
@Inject | |
WebDriver webDriver; | |
@Inject | |
WebDriverWait webDriverWait; | |
@StaleHandler | |
public void click(WebElement element) { |
NewerOlder