SlideShare ist ein Scribd-Unternehmen logo
1 von 122
Anton Semenchenko
Out of box Page Object
Design Pattern, Java
About 
Creator of communities
www.COMAQA.BY and
www.CoreHard.by, founder of
company www.DPI.Solutions,
«tricky» manager at EPAM
Systems. Almost 15 years of
experience in IT, main
specialization: Automation, С++
and lower development,
management, sales.
Agenda, part 1 (to refresh)
1. Page Object – just to “refresh”
2. State-less or state-full solution - just to “refresh”
3. How to select a proper PO implementation?
Agenda, part 2 (to refresh)
• Hypothetical project context
• Compare complexity
• Compare “tech” limitations
• Compare “business” limitations
• Rationale “business” limitations
• How to find and “update” a balance for your own project?
Agenda, part 3 (solutions)
1. “raw” Selenium Page Objects
2. Page Factory from Selenium library
3. HMTL Element framework from Yandex
4. Selenide
5. JDI framework from EPAM
6. SWD Page Recorder
Agenda, part 4 (take away points)
1. A real-life example
2. “Homework”
3. “Rules” and principles
4. A set of useful links
5. What’s next?
6. Questions
Page Object – just to “refresh”
1. Page Objects – encapsulates the way of identification and logical
grouping of widgets.
1. Page Object == Logical Page
1. Page Object != Physical Page
Page Object – “example” ☺
Page Object – “example” ☺
State-less or state-full solution?
1. Let’s compare:
– Photo
• Share – looks like parallelism (easy parallelism).
– Video
• Share – looks like parallelism (not trivial parallelism).
State-less or state-full solution?
1. How easy transform solution from “single” to “multi” threading
(to decrease “QA Automation Windows”)
1. State-less – like share a photo
1. Just 5 minutes of work.
2. State-full – like share a video
1. Not trivial task, could be a night mare.
2. Summary
1. prefer state-less solutions to state-full solutions in mooooost
cases;
2. before start implementation a state-full solution, please, take a
break for a minute, and re-thing everything again, possibly you
can find a proper state-less solution.
Object or static class  State-full or
state-less solution?
1. Static class
 could be implemented as a state-less solution easily
2. Object
 State-full solution in 99,99% cases
3. Summary
 prefer static class based solutions (state-less) to object based
(state-full) in mooooost cases;
 before start implementation based on objects, please, take a
break for a minute, and re-thing everything again, possibly you
can find a proper solution based on static classes.
Page Objects – state-full, general case?
1. Too complicated business logic due to Domain
2. Too complicated business logic due to System size (thousands test-
cases)
3. Too many “contexts”
• Browser versions
• Environments
• Customers with a tiny nuances of functionality
• Platforms (cross-browser Web plus cross-platform Mobile)
• Combination ☺
1. Combination ☺
Page Objects – state-full, special cases
1. Web UI that behaves like a Wizard
2. Web UI in combination with Mobile in one use case
3. Internet of Things (in most cases)
4. More then 1 page during 1 test (for example several portals or several
instances of one portal to implement one “business use case”):
– Really seldom;
– Looks like integration tests (in most cases):
• Std solution- some type of White Box Testing.
5. Many others “special cases”
How to select a proper PO
implementation?
Hypothetical project context – to
compare
1. 30 Physical Pages
2. Standard Header, footer and search functionality for all
physical pages
3. Each Physical Page consists of
– Header – H
– Footer – F
– Search – S
– Some functionality, specific for the Page – U (unique)
Compare complexity – Static Page
Object based
1. 33 Static Page Objects = Logical Pages
2. 0 explicit and 30 implicit Physical Pages
3. Just share 33 Static Page Objects between 30 implicit
Physical Pages
– For example, Header Static Page Object (static class) is used in
test cases for all 30 Physical Page Objects
1. Complexity – just 33 static state-less entities (plus
limitations due to state-less solutions)
Compare complexity – Dynamic Page
Object based (option 1)
1. 33 Dynamic Page Objects = Logical Pages
2. It depends on implementation (one of the ways):
– 0 explicit and 30 implicit Physical Pages
– implicit Physical Page implements on Action layer (limitations
example)
– Action for Physical Page aggregates all necessary Dynamic
Logical Pages
• Physical Pages are implemented in a next way: create all necessary
instances of logical pages, aggregate in some way, use Action layer as
an point of aggregation in most cases, free resources
Compare complexity – Dynamic Page
Object based (option 1)
1. 120 objects (min), each with some state, dynamically created
and frees to implement necessary behavior - to implement 30
implicit Physical Pages
2. Complexity – 120 dynamic, state-full entities min (plus
some limitations due to state-full solution implementation
nuances)
Compare complexity – Dynamic Page
Object based (option 2)
1. 33 Dynamic Page Objects = Logical Pages
2. It depends on implementation (another way):
– 30 explicit Physical Pages
– Multiple Interface inheritance
– Combine Page Objects and Actions layer (in most cases)
– Action-Physical Page (limitations example)
• Implements all Logical Pages interfaces using aggregation and
“delegation”
• Aggregate all Dynamic Logical Page Objects
• Create and frees resources (Dynamic Logical Page Objects)
Compare complexity – Dynamic Page
Object based (option 2)
1. 150 objects, each with some state, dynamically
created and frees to implement necessary behavior
- to implement 30 explicit Physical Pages
2. Complexity – 150 dynamic, state-full not trivial
entities with a multiple interface inheritance
(plus some limitations due to state-full solution
implementation nuances)
Compare “tech” limitations - Static Page
Object based
1. Can be used together with next Design Patterns  Approaches
– Action (both static – preferable and dynamic)
– Key-word driven
– DSL – external only
– BDD – partially, it depends on exact BDD engine implementation
limitations
2. Can’t be used together with next Design Patterns
– Factory
– Flow (Fluent Interface)
– Navigator (for Web)
Compare “tech” limitations - Dynamic
Page Object based
1. No limitations, but …
– For example, in most cases it’s hard to isolate Action and Page
Objects layers
Compare “business” limitations - Static
1. Too complicated business logic due to Domain
2. Too complicated business logic due to System size
(thousands test-cases)
3. Too many “contexts”
– Browser versions
– Environments
– Customers with a tiny nuances of functionality
– Platforms (cross-browser Web plus cross-platform Mobile)
– Combination ☺
1. Combination ☺
Rationale “business” limitations - Static
1. State-less approach - you have a conditional that chooses
different behavior depending on …
2. Solution to simplify the project – refactoring “Replace
Conditional with Polymorphism”
3. Polymorphism = object = State-full approach
Rationale “business” limitations - Static
1. “From refactoring to Patterns”
– There is a set of specific Design Patterns
2. The trickiest part – find a balance for your project now and
update point of balance in time
Compare “business” limitations -
Dynamic
1. Relatively simple business logic due to Domain
2. Relatively simple business logic due to System size (hundreds
test-cases)
3. Not so many “contexts”
– Browser versions
– Environments
– Customers with a tiny nuances of functionality
– Platforms (cross-browser Web plus cross-platform Mobile)
Rationale “business” limitations -
Dynamic
1. State-full approach - you have a set of objects  classes, which
developed, possibly, using several Design Patterns to
implement necessary functionality – to choose different
behavior depending on …
2. Solution to simplify the project – refactoring “Replace
Polymorphism with Conditional”
3. Polymorphism ~= object ~= State-full approach
4. No Polymorphism ~= no objects ~= State-less approach
Rationale “business” limitations -
Dynamic
1. “From Patterns to refactoring”
– There is no need to use a set of specific Design Patterns
2. The trickiest part – find a balance for your project now and
update point of balance in time
Find and “update” a balance for your
own project
Page Factory from Selenium library
Page Factory - definition
1. Page Factory is an inbuilt page object model concept for
Selenium WebDriver but it is very optimized.
2. We use initElements method to initialize web elements
1. Additionally with the help of PageFactory class - use
annotations @FindBy to find WebElement.
2. @FindBy can accept as attributes:
1. tagName
2. name
3. partialLinkText
4. linkText
5. Id
6. Css
7. className
8. Xpath
Page Factory - notes
1. If you use the PageFactory, you can assume that the fields are
initialized. If you don't use the PageFactory, then
NullPointerExceptions will be thrown if you make the assumption
that the fields are already initialized.
2. List<WebElement> fields are decorated if and only if they have
@FindBy or @FindBys annotation. Default search strategy "by id
or name" that works for WebElement fields is hardly suitable for
lists because it is rare to have several elements with the same id
or name on a page.
Page Factory - notes
• WebElements are evaluated lazily. That is, if you never use a
WebElement field in a PageObject, there will never be a call to
"findElement" for it.
• The functionality works using dynamic proxies. This means
that you shouldn't expect a WebElement to be a particular
subclass, even if you know the type of the driver. For example, if
you are using the HtmlUnitDriver, you shouldn't expect the
WebElement field to be initialized with an instance of
HtmlUnitWebElement.
Login Page
1.public class LoginPage {
2. private WebDriver driver;
3. @FindBy(id = "id_username")
4. private WebElement usernameInput;
5. @FindBy(id = "id_password")
6. private WebElement passwordInput;
7. @FindBy(id = "main_action_form_button")
8. private WebElement loginButton;
9.}
Login Page
1. public class LoginPage {
2. public LoginPage(WebDriver driver) {
3. this.driver = driver;
4. PageFactory.initElements(driver, this);
5. }
6. public void login(String username, String password) {
7. usernameInput.sendKeys(username);
8. passwordInput.sendKeys(password);
9. loginButton.click();
10. }
11. }
Home Page
1. public class HomePage {
2. private WebDriver driver;
3. @FindBy(css = "a[href*="login"]")
4. private WebElement loginButton;
5. public HomePage(WebDriver driver) {
6. this.driver = driver;
7. PageFactory.initElements(driver, this);
8. }
9. }
Home Page
1. public class HomePage {
2. public void login() {
3. login(Creds.username, Creds.password);}
4. private LoginPage clickLoginButton() {
5. loginButton.click();
6. return new LoginPage(driver);}
7. private void login(String username, String password) {
8. LoginPage loginPage = clickLoginButton();
9. loginPage.login(username, password);
Login test
1. public class LoginTest {
2. private WebDriver driver;
3. @BeforeMethod
4. public void setup() {
5. driver = new FirefoxDriver();
6. driver.manage().window().maximize();
7. driver.manage().timeouts().implicitlyWait(10,
TimeUnit.SECONDS);
8. driver.get("https://www.pandadoc.com/");}
9. @AfterMethod
10. public void teardown() {
11. driver.close();}}
Login test
1. public class LoginTest {
2. private void assertSignedUp() {
3. new WebDriverWait(driver,
30000).until(ExpectedConditions.visibilityOfElementLocated(By.cs
sSelector(".header-avatar")));}
4. @Test
5. public void loginTest() {
6. HomePage homePage = new HomePage(driver);
7. homePage.login();
8. assertSignedUp();}}
Implementation is based on
• Reflection
• Annotation
• Templates
Page Factory from Selenium library -
info
Page Object Model and Page Factory
Page Factory detailed desription
Page Object (Page Factory context)
AjaxElementLocatorFactory (obsolete)
Source code example
PageFactory.java (source code)
Book with a brief summary of Selenium WebDriver plus Java
bindings (Ru only)
HMTL Elements framework from Yandex
• Designed to provide easy-to-use way of interaction with web-page
elements in your tests.
• It may be considered as an extension of WebDriver Page Object
(PageFactory).
• With the help of Html Elements framework you can group web-
page elements into blocks (Logical Pages), encapsulate logic of
interaction with them and then easily use created blocks in page
objects (Physical Pages).
HMTL Elements framework from Yandex
• Dividing page on blocks using @Block annotation
• Separating different types of elements (button, checkbox)
• Provides an ability to annotate methods as steps – annotation
@Step for work in step-based style
• Provides a set of helpful matchers to use with web-page elements
and blocks
Login Page
1. public class LoginPage {
2. private WebDriver driver;
3. @FindBy(id = "id_username")
4. private static TextInput usernameInput;
5. @FindBy(id = "id_password")
6. private static TextInput passwordInput;
7. @FindBy(id = "main_action_form_button")
8. private static Button loginButton;
9. }
Login Page
1. public class LoginPage {
2. public LoginPage(WebDriver driver) {
3. this.driver = driver;
4. HtmlElementLoader.populatePageObject(this, driver);
5. }
6. public void login(String username, String password) {
7. usernameInput.sendKeys(username);
8. passwordInput.sendKeys(password);
9. loginButton.click();
10. }
11. }
Home Page
1. public class HomePage {
2. private WebDriver driver;
3. @FindBy(css = "a[href*="login"]")
4. private static Button loginButton;
5. public HomePage(WebDriver driver) {
6. this.driver = driver;
7. HtmlElementLoader.populatePageObject(this, driver);
8. }
9. }
Home Page
1. public class HomePage {
2. public void login() {
3. login(Creds.username, Creds.password); }
4. private LoginPage clickLoginButton() {
5. loginButton.click();
6. return new LoginPage(driver); }
7. private void login(String username, String password) {
8. LoginPage loginPage = clickLoginButton();
9. loginPage.login(username, password);}}
Login test
1. public class LoginTest {
2. private WebDriver driver;
3. @BeforeMethod
4. public void setup() {
5. driver = new FirefoxDriver();
6. driver.manage().window().maximize();
7. driver.manage().timeouts().implicitlyWait(10,
TimeUnit.SECONDS);
8. driver.get("https://www.pandadoc.com/"); }
9. @AfterMethod
10. public void teardown() {
11. driver.close(); }}
Login test
1. public class LoginTest {
2. private WebDriver driver;
3. private void assertSignedUp() {
4. new WebDriverWait(driver,
30000).until(ExpectedConditions.visibilityOfElementLocated(By.cs
sSelector(".header-avatar"))); }
5. @Test
6. public void loginTest() {
7. HomePage homePage = new HomePage(driver);
8. homePage.login();
9. assertSignedUp(); }}
Implementation is based on
• Reflection
• Annotation
• Templates
HMTL Elements framework from Yandex
- info
• Official site of the tool
• Examples
• Source code example
• Book with a brief summary of Selenium WebDriver plus Java
bindings (Ru only)
Selenide
Selenide is a wrapper for Selenium Webdriver, oriented, as Geb, on
fast and laconic automation but using Java. Just focus on your
business logic and let Selenide do the rest! Main advantages of that
tool:
• Concise fluent API for tests
• True Page Objects
Selenide
1. Webdriver access
2. jQuery style selectors
3. Ajax support for stable tests
4. Auto-start and browser destructions
5. You don't need to think how to shutdown browser, handle
timeouts and StaleElement Exceptions or search for relevant log
lines, debugging your tests.
Login Page
1. public class LoginPage {
2. private static final By USERNAME_INPUT =
By.id("id_username");
3. private static final By PASSWORD_INPUT =
By.id("id_password");
4. private static final By LOGIN_BUTTON =
By.id("main_action_form_button");
5. public void login(String username, String password) {
6. $(USERNAME_INPUT).val(username);
7. $(PASSWORD_INPUT).val(password);
8. $(LOGIN_BUTTON).click();
9. }}
Login Page
Source code – where …?
Home Page
1. public class HomePage {
2. private static final By LOGIN_BUTTON =
By.cssSelector("a[href*="login"]");
3. public void login() {
4. login(Creds.username, Creds.password); }
5. private LoginPage clickLoginButton() {
6. $(LOGIN_BUTTON).click();
7. return page(LoginPage.class);}
8. private void login(String username, String password) {
9. LoginPage loginPage = clickLoginButton();
10. loginPage.login(username, password); }}
Home Page
Source code – where …?
Login test
public class LoginTest {
private HomePage homePage;
private void assertSignedUp() {
$(By.cssSelector(".header-avatar")).waitUntil(Condition.visible,
30000); }
@BeforeMethod
public void setup() {
Configuration.timeout = 10000;
homePage = open("https://www.pandadoc.com/",
HomePage.class); }
@Test
public void loginTest() {
homePage.login();
assertSignedUp(); } }
Login test
Source code – where …?
Implementation is based on
• Reflection
• Annotation
• Templates
Selenide - info
• Official site of the tool
• Examples
• Source code example
• Book with a brief summary of Selenium WebDriver plus Java
bindings (Ru only)
GDI – from EPAM Systems
JDI Goals
1. Accumulate best practices of UI automation (open source, page
objects, logging, parallelism etc.)
2. Multiplatform framework
3. Intuitive test framework
4. Stable framework
5. Flexible framework
GDI features
• Interfaces based elements
• Complex UI Objects
• Simple + Complex UI elements + standard Forms = 31
• Cascade UI Objects Initialization
• Multiplatform
• Logging for all actions
• Stabilization mechanism
• Wide Customization abilities
• Module-based architecture
• Parallel test runs support
PageObject “infrastructure”
UI Objects
– UI elements for Web (Button, Label, Table…)
– IU elements for other platforms (any UI)
– “Standard” PageObjects
• Form
• Search
• Pagination
• Login
• others
Page Objects
– UI elements
– Actions with UI elements
Simple UI Elements – 10
1. Text
2. Button/Label
3. Link
4. Image
5. Checkbox
6. TextField
7. DatePicker
8. FileInput
9. TextArea
10. And others :)
Complex UI Elements – 12
• Selector
• RadioButtons
• Dropdown
• Tabs/Menu
• CheckList
• DropList
• ComboBox
• TextList
• Table
• Tree
• Range
• And others :)
Standard Pages - 9
• Page
• Section
• Form
• Pop
• PopupForm
• Search
• Pagination
• NavigationPane
PageObject std example, 1 (GDI)
@JPage(url = "http://www.epam.com")
public class JacketPage extends WebPage {
@FindBy(css=“someSelector") public Menu menu;
@FindBy(css="someSelector") public CheckList sizes;
@FindBy(css=" someSelector") public Button searchButton;
@FindBy(css=" someSelector") public Table results;
}
Test std example, 1 (GDI)
1. @Test
2. public void menuTest() {
3. menu.select("Man");
4. sizes.check("M", "L");
5. searchButton.click();
6. Assert.areEquals(results.rows().count(), 4);
7. Assert.isNotEmpty(results.row("Best Jacket", column("Title")));
8. }
PageObject std example, 1 (Selenium)
public class JacketPage {
@FindBy(css="") public List<WebElement> menuElements;
@FindBy(css="") public WebElement menuIsSelected;
@FindBy(css="") public List<WebElement> sizesElements;
@FindBy(css="") public WebElement sizesIsChecked;
@FindBy(css="") public List<WebElement> sizesLabels;
@FindBy(css="") public WebElement searchButton;
@FindBy(css="") public List<WebElement> resultsColumnHeaders;
@FindBy(css="") public List<WebElement> resultsRowsHeaders;
@FindBy(css="") public List<WebElement>resultsCellsHeaders;
@FindBy(css="") public List<WebElement> resultsColumn;
@FindBy(css="") public List<WebElement> resultsRow;
…
}
PageObject std example, 1 (Selenium)
public class JacketPage {
@FindBy(css="") public List<WebElement> menuElements;
...
@FindBy(css="") public List<WebElement> resultsRow;
public void selectElementFromMenu(String name) { … }
public String getSelectedMenuItem() { … }
public boolean isMenuItemSelected(String name) { … }
public void selectElementFromMenu(String name) { … }
…
public int getResultsCount() { … }
public boolean isResultPresent(String name) { … }
public WebElement getSomeAttributeForResult(String name) { … }
…
public List<WebElement> findAllResultsMatch(String name) { … }
}
PageObject std example, 2 (GDI)
1. @JPage(url = "/login", title = "EPAM - Login page")
2. public class LoginPage extends PageForm {
3. @FindBy(css = “.login”) private ITextField login;
4. @FindBy(css = “.password”) private ITextField password;
5. @FindBy(css = “.loginButton”) private IButton loginButton;
6. }
Test std sexample, 2 (GDI)
1. @Test
2. public void exampleTest(String searchText) {
3. loginPage.login(client);
4. searchPage.search(searchText);
5. resultsPage.results.eachContains(searchText);
6. resultsPage.openFirstResult();
7. productPage.check.productHasNoEmptyData();
8. }
Test std example, 3 (GDI)
@Test
public void shopTest() {
loginPage.open();
loginForm.login(new User(“user", "password"));
search.find("best jacket");
productForm.submit(Products.TestJacket);
pagination.next();
pagination.selectPage(5);
}
PageObject std example, 4 (GDI,
“model” based)
1. public class LoginForm extends Form<User> {
2. @FindBy(css=“someLocator")
3. public TextField name;
4. @FindBy(css=“someLocator")
5. public TextField password;
6. @FindBy(css=“someLocator")
7. public Button loginButton;
8. }
PageObject std example, 4 (GDI,
“model” based)
public class User {
public String name;
public String password;
public User(String name,
String password) {
this.name = name;
this.password = password;
}
}
PageObject std example, 5 (GDI)
1. @JSite(domain = "https://www.epam.com")
2. public class EpamSite extends WebSite {
3. @JPage(url = "/")
4. public static HomePage homePage;
5. @JPage(url = "/careers", title = "Careers")
6. public static CareerPage careerPage;
7. @JPage(url = "/careers/job-listings", title = "Job Listings",
8. urlCheckType = CONTAIN, titleCheckType = CONTAIN)
9. public static JobPage jobPage;
10....
11.}
WebSite.init(EpamSite.class);
“Forms” Page Object (GDI)
1. public class AddCVForm extends Form<Attendee> {
2. @FindBy(css = “.first-name“) private ITextField name;
3. @FindBy(css = “.last-name“) private ITextField lastName;
4. @FindBy(css = “.email“) private ITextField email;
5. @FindBy(css = “.file-upload“) private RFileInput cv;
6. @FindBy(css = “.comment-input“) private ITextArea comment;
7. @FindBy(xpath = “//*[.='Submit']“) private IButton submit;
8. @FindBy(xpath = “//*[.='Cancel']“) private IButton cancel;
9. }
Entities driven testing (GDI)
@Test(dataProvider = “attendees”)
public void menuTest(Attendee attendee) {
searchFilter.fill(attendee);
checkSuggestionsContains(attendee);
searchFilter.search(attendee);
assertEquals(results.rows().count(), 1);
results.row(attendee.name, column(“Name”))
addCVForm.submit(attendee.cv);
checkCVInDB(attendee.cv);
previewForm.verify(attendee);
}
Java examples
public class HomePage extends WebPage {
@FindBy(css="div.tabs-ui[data-path*=
'/content/epam/en/jcr:content/content_container/
section_4/section-par/tabs']")
public EpamCoreSection epamCoreSection;
}
Java examples
public class EpamCoreSection extends Section {
@FindBy(css="div.tab-1>div.text>div.text-ui
>p>span.font-size-26")
public Text whoWeAreText;
@FindBy(css="div.tab-2>div.text>div.text-ui
>p>span.font-size-26")
public Text whatWeDoText;
@FindBy(css="div.tab-3>div.text>div.text-ui
>p>span.font-size-26")
public Text whoWeServeText;
@FindBy(xpath="//div[.='Who we serve']")
public Button whoWeServe;
@FindBy(xpath="//div[.='Who we are']")
public Button whoWeAre;
@FindBy(xpath="//div[.='What we do']")
public Button whatWeDo;
}
Java examples
@Test
public void presentationSimpleTest() {
homePage.checkOpened();
homePage.epamCoreSection.whoWeAre.highlight();
homePage.epamCoreSection.whoWeAreText.highlight();
new Check("Tab text").areEquals("" +
"We are more than developers.
We are the experts that
will take your business into the digital future.",
homePage.epamCoreSection.whoWeAreText.getText());
homePage.epamCoreSection.highlight();
homePage.epamCoreSection.whoWeServe.highlight();
homePage.epamCoreSection.whoWeServe.click();
}
Java examples
@Test
public void presentationComplexTest() {
homePage.checkOpened();
textToTest(HomeTabs.WHATWEDO,homePage.epamCoreSection);
textToTest(HomeTabs.WHOWEARE,homePage.epamCoreSection);
textToTest(HomeTabs.WHOWESERVE,homePage.epamCoreSection);
}
Java examples
public void textToTest(HomeTabs tab, EpamCoreSection
epamCoreSection){
switch (tab) {
case WHOWEARE:
chooseTab(epamCoreSection.whoWeAre,
epamCoreSection.whoWeAreText,
HomeTabsTextToCheck.WHOWEARE);
break;
case WHATWEDO:
chooseTab(epamCoreSection.whatWeDo,
epamCoreSection.whatWeDoText,
HomeTabsTextToCheck.WHATWEDO);
break;
case WHOWESERVE:
chooseTab(epamCoreSection.whoWeServe,
epamCoreSection.whoWeServeText,
HomeTabsTextToCheck.WHOWESERVE);
break;
}
}
Java examples
public void chooseTab(Button tab, Text text, String
textToCheck){
tab.highlight();
tab.click();
text.highlight();
new Check("Tab text").areEquals(textToCheck,
text.getText());
}
Java examples
public static class HomeTabsTextToCheck {
public static final String WHOWEARE="We are more than developers." +
" We are the experts that will take your business into the digital future.";
public final static String WHATWEDO="We transform businesses through the art of
digitization." + " Our expertise spans multiple disciplines," +
" providing our clients with software solutions that dramatically drive
results and outcomes.";
public final static String WHOWESERVE="The right technology translates business
strategies into results." + " We deliver domain-specific, transformative software
solutions that reshape the way you do business.";
}
Customization
1. Customize method’s behavior
2. Customize element’s behavior
3. Customize all objects behavior
4. Develop new UI element
5. Modules
• Logger
• Asserter
• Driver
• etc.
Architecture  Modules structure
Architecture  Modules structure
Implementation is based on
Implementation is based on … what?
Let’s:
• download source code
• familiarize
• investigate
• develop a tiny prototype
• try to use
• try to improve (for example, add Decorator DP based features)
• welcome to QA Automation tools development
• welcome to Open Source
JDI - info
• http://jdi.epam.com/
• http://jdi.epam.com/download
• https://github.com/epam/JDI/tree/master/Java/Tests
• https://github.com/epam/JDI/tree/master/Java
• https://github.com/epam/JDI/tree/master/C%23.Net/Tests
• https://github.com/epam/JDI/tree/master/C%23.Net
• IT-Saturday video (Ru only)
• “JDI - EPAM Framework (IT-Subbotnik, with listings).pptx” (RU)
• “JDI - QA Conf 2016.pptx” (Ru)
• “JDI – Secon 2016.pptx” (EN)
Serenity (ex. Thucydides)
1. Serenity (Thucydides) – is an open-source tool, oriented on effective
acceptance testing and detailed documentation and reports of the
project.
2. It works with Junit and BDD tools like JBehave and Cucumber-JVM,
and gives a wide API for automated testing with integrity with Selenium
Webdriver.
3. It is made for the following tasks:
• Creating more flexible tests, which are easier to be supported
• Getting illustrated story-based reports
• Clear context of connection between tests and requirements
• Measurement of requirements coverage.
Serenity (ex. Thucydides) workflow
• Step 1: Defining requirement and acceptance criteria
It starts from requirements, which are need to be tested. For every
requirement there is an acceptance criteria which describing the
requirement better. Thucydides automate acceptance criteria
• Step 2: Modelling the requirements
With the help of Thucydides you create a simple model of requirements
made on Java language. There are some ways of modelling requirements,
including simple Java class, using convention and structure of directories
of integrating with other tools like Jira. That approach allows the developer
what requirement is tested each of the test, and give Thucydides the ability
to track testing features and requirements
Serenity (ex. Thucydides) workflow
• Step 3: Automation of acceptance testing
Next is describing acceptance criteria by business language is following,
and automation engineers implement them using BDD such as jBehave or
Cucumber-JVM, or using Java and Junit, in order for Thucydides to run it
with “pending” status (body is not implemented)
• Step 4: Test implementation
Automation Engineers now can implement acceptance criteria in a form of
real-time AUT test. Tests can be divided into steps for better readability
and easiness of support. Webdriver is used for testing.
Serenity (ex. Thucydides) workflow
• Step 5: Test results report
Thucydides allow you to create detailed test reports about test runs,
including:
History for ach test
Screenshot for each test step
Result of test run including time and error messages
• Step 6: Requirements coverage report
Besides test run reports, Thucideds also provide information about:
Number of tested requirements
Number of passed requirements
Number of requirements which need to be run
Serenity (ex. Thucydides) workflow
• Step 7: Project progress report
Thucydides provide information about project history progress:
Change in number of features implemented in time
Change in quantity of implemented and tested features in time
Change of failed tests in time
• Summary
As we can see, Thucydides is a rather complex tool, build around BDD
concept and acceptance testing, using Webdriver for testing web
applications.
• Info
Official website
Official documentation
Page Object
And what about Page Object supports …?
Page Object “default” implementation
Framework implements Page Object pattern and let’s you decrease code
duplication another one type of classes between tests and pages, called
“steps”. Let’s look at “steps” with page object class:
1. public class StepsinBook extends ScenarioSteps {
2. public StepsinBook(Pages pages) {
3. super(pages);
4. }
5. public BookPage getPageBook()
6. {
7. return getPages().currentPageAt(BookPage.class);
8. }
9. }
Page Object “default” implementation
1. public class StepsinBook extends ScenarioSteps {
2. @Step public void getMain(String url)
3. {
4. getPageBook().getMainPage(url);
5. }
6. @Step public void AllBooks()
7. {
8. getPageBook().allBooks();
9. }
10. @Step public void search(){
11. getPageBook().search(“Book");
12. }
13. @Step public void catalog(){
14. getPageBook().catalog();
15. }}
Page Object “default” implementation
1. public class BookPage extends PageObject {
2. @FindBy(linkText = “All books")
3. WebElement allbooksButton;
4. @FindBy(linkText = “Search")
5. WebElement searchButton;
6. @FindBy(name = "query")
7. WebElement searchField;
8. @FindBy(css = "button")
9. WebElement searchBegin;
10. }
Page Object “default” implementation
1. public class BookPage extends PageObject {
2. public BookPage(WebDriver driver) {
3. super(driver);
4. }
5. public void getMainPage(String url) {
6. getDriver().get(url);
7. }
8. public void allBooks() {
9. allbooksButton.click();
10. }
11. public void search(String searchWord) {
12. searchButton.click();
13. searchField.sendKeys(searchWord);
14. searchBegin.click();
15. }
16. }
Implementation is based on
• Reflection
• Annotation
• Templates
Geb – general info
1. Tool for browser automation, made on Groovy (JVM-based) and based
on Selenium Webdriver.
1. It using:
1. Selenium for browser automation
2. jQuery selectors for locating elements
3. Page object pattern
.
2. In the bounds of testing it can be easily integrated with different test
frameworks like:
1. Junit
2. TestNG
3. Spock
Geb – general info
If to compare with Webdriver API, Geb provides more comfortable interface
in the following areas:
• Working with Webdriver instance (creating, configuration, moves,
destruction)
• Locating elements (jQuery locators)
• Page object pattern
• Waiters
• Page interactions
• Work with AJAX elements
• Integration with build-tools (maven, gradle, grails)
• Integration with cloud services (Sauce labs, Browser Stack)
Official website
Official documentation
Geb - example
1. import geb.Browser
2. Browser.drive {
3. go "http://myapp.com/login"
4. assert $("h1").text() == "Please Login"
5. $("form.login").with {
6. username = "admin"
7. password = "password"
8. login().click()
9. }
10. assert $("h1").text() == "Admin Section"
11. }
SWD Page Recorder
1. SWD Page Recorder helps you to create locators of web-page,
debug them in the application and generate PageObject code for
classes on C#, Java, Python, Ruby, Perl for using them in
Selenium Webdriver tests.
2. That tool not only lets you find locator needed, but also optimize it
and generate all the code needed for further element declaration in
the code.
3. SWD Page Recorder is a unified tool for working with locators in
every browser which are supported by Selenium.
4. Important moment that Page Recorder tests the selectors using
Webdriver – so you’re not going to have cases when locator find
other way will not work in Webdriver.
SWD Page Recorder
Sources, documentation and so on
How to select an appropriate solution?
A real-life example
1. Business context
2. Tech context
– Challenge
– Solution
– Technology Stack
3. QA Automation process context
4. Source code example
5. Summary
Example
1. Example and “home work”
– How to setting up environment
• This is task 0 ☺
– Where to download
(https://github.com/comaqaby/Patterns/tree/master/C%23)
– How to build
– How to configure
– How to run
“Homework”, part 1 ☺
1. Download example’ source code (for each “solution”)
2. “Investigate”
3. Develop a TODO list with a set of improvements
4. Setting up environment
5. Compile and Run
6. “Play”
7. Improve  Update TODO list with a set of improvements
“Homework”, part 2 ☺
1. Read recommended books and articles
2. Improve  Update TODO list with a set of improvements
3. Provide me via email with an intermediate and final list of
improvements
4. Develop at least 1 more auto-test (for each “solution”)
5. Develop a set of metrics to “compare” solutions
6. Develop an algorithm “How to select a proper solution”
7. Provide me via email with a set of metrics + algorithm
8. Next iteration ☺
“Homework”, part 3 ☺
1. Play with GDI “attentively”
2. Join QA Automation tools development
3. Join Open Source “world”
“Rules” and principles
1. Could you please “refresh” your theoretical knowledge, slides 1-
31, thanks
Useful links
1. Martin Fowler “Refactoring”
– http://martinfowler.com/books/refactoring.html
– http://refactoring.com/
– http://refactoring.com/catalog/
– http://refactoring.com/catalog/replaceConditionalWithPolymorphism.h
tml
Useful links
1. Refactoring to Patterns and vice versa
– https://industriallogic.com/xp/refactoring/
– https://industriallogic.com/xp/refactoring/catalog.html
– https://industriallogic.com/xp/refactoring/conditionDispatcherWithCo
mmand.html
– https://industriallogic.com/xp/refactoring/conditionalWithStrategy.html
– http://martinfowler.com/books/r2p.html
Useful links
1. https://sourcemaking.com/
– https://sourcemaking.com/refactoring
– https://sourcemaking.com/refactoring/replace-conditional-with-
polymorphism
– https://sourcemaking.com/design_patterns
– https://sourcemaking.com/antipatterns
• https://sourcemaking.com/antipatterns/software-development-antipatterns
• https://sourcemaking.com/antipatterns/software-architecture-antipatterns
– https://sourcemaking.com/uml
Tech “basement”
• Grady Butch «Object oriented analysis and design with
examples of apps on C++
Notes: IMHO No need to be afraid of C++, 95% of the material
is conceptual, there is no strict connection to chosen language. From
my point of view is one of the best books for true getting to know
with OOP.
• Martin Fowler «Refactoring»
Notes: IMHO strongly recommend to read from cover to cover,
twice, in order to have contents of the book – you active
professional luggage.
• Gang of four “Design patterns”
Notes: IMHO strongly recommend to read from cover to cover,
twice, in order to have contents of the book – you active
professional luggage.
Tech “basement”
• D. Thomas, Andrew Hunt “Pragmatic Programmer, The: From
Journeyman to Master”
Notes: IMHO Amazing book that consists of a ton of advices.
IMHO strongly recommend to read from cover to cover, twice, in
order to have contents of the book – you active professional
luggage. And then look through different chapters before
talking to a customer.
• Steve McConnel “Code complete”
Notes: IMHO No need to be afraid of the size of the book ... it
should be read or before “going to bed”, or from any place, of
separate chapters, just to fresh things in the memory in the chosen f
ield of problem.
What’s next?!
• “Out of box Page Object Design Pattern, Java”
• Dynamic solutions
• Let’s compare with a static one
• “Out of box Page Object Design Pattern, .Net C#”
• Dynamic solutions
• Let’s compare with a static one
Summary: 5/12 - Webinar, 5/13 – send all necessary materials
• “Variants of implementation Page Object Design Pattern from the
scratches, without being bind to any programming language”
• Static solutions
• Dynamic solutions
• Let’s compare static and dynamic
• Answer to all our questions
Summary: 5/19 - Webinar, 5/19 – send all necessary materials
Anton_Semenchenko@epam.com
Skype - semenchenko_anton_v
+375 33 33 46 120
+375 44 74 00 385
https://www.linkedin.com/in/anton-semenchenko-612a926b
https://www.facebook.com/semenchenko.anton.v
https://twitter.com/comaqa
www.comaqa.by
www.corehard.by

Weitere ähnliche Inhalte

Was ist angesagt?

Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Alan Richardson
 
DSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsDSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsMikalai Alimenkou
 
Webdriver cheatsheets summary
Webdriver cheatsheets summaryWebdriver cheatsheets summary
Webdriver cheatsheets summaryAlan Richardson
 
Design Patterns for QA Automation
Design Patterns for QA AutomationDesign Patterns for QA Automation
Design Patterns for QA AutomationCOMAQA.BY
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAlan Richardson
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Iakiv Kramarenko
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object patternMichael Palotas
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and EasybIakiv Kramarenko
 
Static and dynamic Page Objects with Java \ .Net examples
Static and dynamic Page Objects with Java \ .Net examplesStatic and dynamic Page Objects with Java \ .Net examples
Static and dynamic Page Objects with Java \ .Net examplesCOMAQA.BY
 
Selenium withnet
Selenium withnetSelenium withnet
Selenium withnetVlad Maniak
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testingdrewz lin
 
20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_twTse-Ching Ho
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React EcosystemFITC
 
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...Iakiv Kramarenko
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React AppAll Things Open
 
Getting Started with React-Nathan Smith
Getting Started with React-Nathan SmithGetting Started with React-Nathan Smith
Getting Started with React-Nathan SmithTandemSeven
 
Lessons from a year of building apps with React Native
Lessons from a year of building apps with React NativeLessons from a year of building apps with React Native
Lessons from a year of building apps with React NativeRyan Boland
 

Was ist angesagt? (20)

Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
 
DSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional testsDSL, Page Object and Selenium – a way to reliable functional tests
DSL, Page Object and Selenium – a way to reliable functional tests
 
Webdriver cheatsheets summary
Webdriver cheatsheets summaryWebdriver cheatsheets summary
Webdriver cheatsheets summary
 
Design Patterns for QA Automation
Design Patterns for QA AutomationDesign Patterns for QA Automation
Design Patterns for QA Automation
 
Automation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and BeyondAutomation Abstraction Layers: Page Objects and Beyond
Automation Abstraction Layers: Page Objects and Beyond
 
Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]Kiss PageObjects [01-2017]
Kiss PageObjects [01-2017]
 
Selenium - The page object pattern
Selenium - The page object patternSelenium - The page object pattern
Selenium - The page object pattern
 
Easy tests with Selenide and Easyb
Easy tests with Selenide and EasybEasy tests with Selenide and Easyb
Easy tests with Selenide and Easyb
 
Static and dynamic Page Objects with Java \ .Net examples
Static and dynamic Page Objects with Java \ .Net examplesStatic and dynamic Page Objects with Java \ .Net examples
Static and dynamic Page Objects with Java \ .Net examples
 
Selenium withnet
Selenium withnetSelenium withnet
Selenium withnet
 
Top100summit 谷歌-scott-improve your automated web application testing
Top100summit  谷歌-scott-improve your automated web application testingTop100summit  谷歌-scott-improve your automated web application testing
Top100summit 谷歌-scott-improve your automated web application testing
 
20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_tw
 
Easy automation.py
Easy automation.pyEasy automation.py
Easy automation.py
 
Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)Behavior Driven Development Testing (BDD)
Behavior Driven Development Testing (BDD)
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
 
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
Selenide Alternative in Practice - Implementation & Lessons learned [Selenium...
 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
 
Getting Started with React-Nathan Smith
Getting Started with React-Nathan SmithGetting Started with React-Nathan Smith
Getting Started with React-Nathan Smith
 
Lessons from a year of building apps with React Native
Lessons from a year of building apps with React NativeLessons from a year of building apps with React Native
Lessons from a year of building apps with React Native
 
Intro to ReactJS
Intro to ReactJSIntro to ReactJS
Intro to ReactJS
 

Andere mochten auch

Advanced locators - little prince
Advanced locators - little princeAdvanced locators - little prince
Advanced locators - little princeCOMAQA.BY
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object PatternAnand Bagmar
 
От хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере BackendОт хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере BackendCOMAQA.BY
 
Piec Przemian - jak zaczac przygode
Piec Przemian - jak zaczac przygodePiec Przemian - jak zaczac przygode
Piec Przemian - jak zaczac przygodezelaelaelaelaz
 
Самодельная параметризация и параллелизация тестов на Webdriver (JS)
Самодельная параметризация и параллелизация тестов на Webdriver (JS) Самодельная параметризация и параллелизация тестов на Webdriver (JS)
Самодельная параметризация и параллелизация тестов на Webdriver (JS) COMAQA.BY
 
SECON'2016. Стахиевич Андрей, Selenide: используем listener-ы
SECON'2016. Стахиевич Андрей, Selenide: используем listener-ыSECON'2016. Стахиевич Андрей, Selenide: используем listener-ы
SECON'2016. Стахиевич Андрей, Selenide: используем listener-ыSECON
 
Automating Canvas: difficult but possible
Automating Canvas: difficult but possibleAutomating Canvas: difficult but possible
Automating Canvas: difficult but possibleCOMAQA.BY
 
JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...
JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...
JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...Yusuke Yamamoto
 
Automating Canvas Applications Using Selenium
Automating Canvas Applications Using SeleniumAutomating Canvas Applications Using Selenium
Automating Canvas Applications Using Seleniumdavehunt82
 
Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questionsjbashask
 
Page object with selenide
Page object with selenidePage object with selenide
Page object with selenideCOMAQA.BY
 
Automation using Scripting and the Canvas API
Automation using Scripting and the Canvas APIAutomation using Scripting and the Canvas API
Automation using Scripting and the Canvas APIDavid Lippman
 
Refactoring page objects The Screenplay Pattern
Refactoring page objects   The Screenplay Pattern Refactoring page objects   The Screenplay Pattern
Refactoring page objects The Screenplay Pattern RiverGlide
 
Wso2 con raspberry-pi-cluster
Wso2 con raspberry-pi-clusterWso2 con raspberry-pi-cluster
Wso2 con raspberry-pi-clusterAfkham Azeez
 
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшe
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшeQA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшe
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшeQAFest
 
карта IT профессий
карта IT профессийкарта IT профессий
карта IT профессийCOMAQA.BY
 
Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingAustin Marie Gay
 
Tutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with GherkinTutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with GherkinChristian Hassa
 

Andere mochten auch (20)

Advanced locators - little prince
Advanced locators - little princeAdvanced locators - little prince
Advanced locators - little prince
 
Perils of Page-Object Pattern
Perils of Page-Object PatternPerils of Page-Object Pattern
Perils of Page-Object Pattern
 
От хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере BackendОт хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере Backend
 
Design Patern::Adaptor pattern
Design Patern::Adaptor patternDesign Patern::Adaptor pattern
Design Patern::Adaptor pattern
 
Piec Przemian - jak zaczac przygode
Piec Przemian - jak zaczac przygodePiec Przemian - jak zaczac przygode
Piec Przemian - jak zaczac przygode
 
Самодельная параметризация и параллелизация тестов на Webdriver (JS)
Самодельная параметризация и параллелизация тестов на Webdriver (JS) Самодельная параметризация и параллелизация тестов на Webdriver (JS)
Самодельная параметризация и параллелизация тестов на Webdriver (JS)
 
SECON'2016. Стахиевич Андрей, Selenide: используем listener-ы
SECON'2016. Стахиевич Андрей, Selenide: используем listener-ыSECON'2016. Стахиевич Андрей, Selenide: используем listener-ы
SECON'2016. Стахиевич Андрей, Selenide: используем listener-ы
 
Automating Canvas: difficult but possible
Automating Canvas: difficult but possibleAutomating Canvas: difficult but possible
Automating Canvas: difficult but possible
 
JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...
JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...
JavaOne2016 #CON5929 Time-Saving Tips and Tricks for Building Quality Java Ap...
 
Automating Canvas Applications Using Selenium
Automating Canvas Applications Using SeleniumAutomating Canvas Applications Using Selenium
Automating Canvas Applications Using Selenium
 
Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questions
 
Page object with selenide
Page object with selenidePage object with selenide
Page object with selenide
 
Automation using Scripting and the Canvas API
Automation using Scripting and the Canvas APIAutomation using Scripting and the Canvas API
Automation using Scripting and the Canvas API
 
Refactoring page objects The Screenplay Pattern
Refactoring page objects   The Screenplay Pattern Refactoring page objects   The Screenplay Pattern
Refactoring page objects The Screenplay Pattern
 
Wso2 con raspberry-pi-cluster
Wso2 con raspberry-pi-clusterWso2 con raspberry-pi-cluster
Wso2 con raspberry-pi-cluster
 
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшe
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшeQA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшe
QA Fes 2016. Алексей Виноградов. Page Objects: лучше проще, да лучшe
 
карта IT профессий
карта IT профессийкарта IT профессий
карта IT профессий
 
Beyond Page Objects
Beyond Page ObjectsBeyond Page Objects
Beyond Page Objects
 
Selenium and Open Source Advanced Testing
Selenium and Open Source Advanced TestingSelenium and Open Source Advanced Testing
Selenium and Open Source Advanced Testing
 
Tutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with GherkinTutorial: Implementing Specification-By-Example with Gherkin
Tutorial: Implementing Specification-By-Example with Gherkin
 

Ähnlich wie Anton Semenchenko Out of box Page Object Design Pattern

High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2Niti Chotkaew
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax ApplicationsJulien Lecomte
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource GroupShahzad
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara AnjargolianHakka Labs
 
Building Your First Store App with XAML and C#
Building Your First Store App with XAML and C#Building Your First Store App with XAML and C#
Building Your First Store App with XAML and C#Tamir Dresher
 
Parallel run selenium tests in a good way
Parallel run selenium tests in a good  wayParallel run selenium tests in a good  way
Parallel run selenium tests in a good wayCOMAQA.BY
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themVlad Fedosov
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoFu Cheng
 
Professionalizing the Front-end
Professionalizing the Front-endProfessionalizing the Front-end
Professionalizing the Front-endJordi Anguela
 
Using Web Taxonomies in Drupal
Using Web Taxonomies in DrupalUsing Web Taxonomies in Drupal
Using Web Taxonomies in DrupalJoachim Neubert
 
Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...Sage Computing Services
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Marco Breveglieri
 
Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...
Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...
Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...Jalal Mostafa
 
Super applied in a sitecore migration project
Super applied in a sitecore migration projectSuper applied in a sitecore migration project
Super applied in a sitecore migration projectdodoshelu
 

Ähnlich wie Anton Semenchenko Out of box Page Object Design Pattern (20)

JS Essence
JS EssenceJS Essence
JS Essence
 
High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2High Performance Ajax Applications 1197671494632682 2
High Performance Ajax Applications 1197671494632682 2
 
High Performance Ajax Applications
High Performance Ajax ApplicationsHigh Performance Ajax Applications
High Performance Ajax Applications
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
L07 Oranizing Domain Logic
L07 Oranizing Domain LogicL07 Oranizing Domain Logic
L07 Oranizing Domain Logic
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
 
Building Your First Store App with XAML and C#
Building Your First Store App with XAML and C#Building Your First Store App with XAML and C#
Building Your First Store App with XAML and C#
 
Parallel run selenium tests in a good way
Parallel run selenium tests in a good  wayParallel run selenium tests in a good  way
Parallel run selenium tests in a good way
 
KharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address themKharkivJS: Flaws of the Web Components in 2019 and how to address them
KharkivJS: Flaws of the Web Components in 2019 and how to address them
 
Flamingo Carotene
Flamingo CaroteneFlamingo Carotene
Flamingo Carotene
 
Advanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojoAdvanced guide to develop ajax applications using dojo
Advanced guide to develop ajax applications using dojo
 
Professionalizing the Front-end
Professionalizing the Front-endProfessionalizing the Front-end
Professionalizing the Front-end
 
Using Web Taxonomies in Drupal
Using Web Taxonomies in DrupalUsing Web Taxonomies in Drupal
Using Web Taxonomies in Drupal
 
Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...Application Express - A web development environment for the masses - and for ...
Application Express - A web development environment for the masses - and for ...
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
 
Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...
Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...
Single Page Applications Workshop Part I: Interesting Topics in HTML5, CSS an...
 
Super applied in a sitecore migration project
Super applied in a sitecore migration projectSuper applied in a sitecore migration project
Super applied in a sitecore migration project
 

Mehr von COMAQA.BY

Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...COMAQA.BY
 
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...COMAQA.BY
 
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...COMAQA.BY
 
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важностьRoman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важностьCOMAQA.BY
 
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...COMAQA.BY
 
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...COMAQA.BY
 
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...COMAQA.BY
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...COMAQA.BY
 
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.COMAQA.BY
 
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.COMAQA.BY
 
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...COMAQA.BY
 
Моя роль в конфликте
Моя роль в конфликтеМоя роль в конфликте
Моя роль в конфликтеCOMAQA.BY
 
Организация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиковОрганизация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиковCOMAQA.BY
 
Развитие или смерть
Развитие или смертьРазвитие или смерть
Развитие или смертьCOMAQA.BY
 
Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовCOMAQA.BY
 
Эффективная работа с рутинными задачами
Эффективная работа с рутинными задачамиЭффективная работа с рутинными задачами
Эффективная работа с рутинными задачамиCOMAQA.BY
 
Как стать синьором
Как стать синьоромКак стать синьором
Как стать синьоромCOMAQA.BY
 
Open your mind for OpenSource
Open your mind for OpenSourceOpen your mind for OpenSource
Open your mind for OpenSourceCOMAQA.BY
 
JDI 2.0. Not only UI testing
JDI 2.0. Not only UI testingJDI 2.0. Not only UI testing
JDI 2.0. Not only UI testingCOMAQA.BY
 
Battle: BDD vs notBDD
Battle: BDD vs notBDDBattle: BDD vs notBDD
Battle: BDD vs notBDDCOMAQA.BY
 

Mehr von COMAQA.BY (20)

Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
Тестирование аналогов инсталлируемых приложений (Android Instant Apps, Progre...
 
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
Anton semenchenko. Comaqa Spring 2018. Nine circles of hell. Antipatterns in ...
 
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
Vivien Ibironke Ibiyemi. Comaqa Spring 2018. Enhance your Testing Skills With...
 
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важностьRoman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
Roman Soroka. Comaqa Spring 2018. Глобальный обзор процесса QA и его важность
 
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
Roman Iovlev. Comaqa Spring 2018. Архитектура Open Source решений для автомат...
 
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
Vladimir Polyakov. Comaqa Spring 2018. Особенности тестирования ПО в предметн...
 
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
Kimmo Hakala. Comaqa Spring 2018. Challenges and good QA practices in softwar...
 
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
Дмитрий Лемешко. Comaqa Spring 2018. Continuous mobile automation in build pi...
 
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
 
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
Vadim Zubovich. Comaqa Spring 2018. Красивое тестирование производительности.
 
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
Alexander Andelkovic. Comaqa Spring 2018. Using Artificial Intelligence to Te...
 
Моя роль в конфликте
Моя роль в конфликтеМоя роль в конфликте
Моя роль в конфликте
 
Организация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиковОрганизация приемочного тестирования силами матерых тестировщиков
Организация приемочного тестирования силами матерых тестировщиков
 
Развитие или смерть
Развитие или смертьРазвитие или смерть
Развитие или смерть
 
Системный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестовСистемный взгляд на параллельный запуск Selenium тестов
Системный взгляд на параллельный запуск Selenium тестов
 
Эффективная работа с рутинными задачами
Эффективная работа с рутинными задачамиЭффективная работа с рутинными задачами
Эффективная работа с рутинными задачами
 
Как стать синьором
Как стать синьоромКак стать синьором
Как стать синьором
 
Open your mind for OpenSource
Open your mind for OpenSourceOpen your mind for OpenSource
Open your mind for OpenSource
 
JDI 2.0. Not only UI testing
JDI 2.0. Not only UI testingJDI 2.0. Not only UI testing
JDI 2.0. Not only UI testing
 
Battle: BDD vs notBDD
Battle: BDD vs notBDDBattle: BDD vs notBDD
Battle: BDD vs notBDD
 

Kürzlich hochgeladen

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

Anton Semenchenko Out of box Page Object Design Pattern

  • 1. Anton Semenchenko Out of box Page Object Design Pattern, Java
  • 2. About  Creator of communities www.COMAQA.BY and www.CoreHard.by, founder of company www.DPI.Solutions, «tricky» manager at EPAM Systems. Almost 15 years of experience in IT, main specialization: Automation, С++ and lower development, management, sales.
  • 3. Agenda, part 1 (to refresh) 1. Page Object – just to “refresh” 2. State-less or state-full solution - just to “refresh” 3. How to select a proper PO implementation?
  • 4. Agenda, part 2 (to refresh) • Hypothetical project context • Compare complexity • Compare “tech” limitations • Compare “business” limitations • Rationale “business” limitations • How to find and “update” a balance for your own project?
  • 5. Agenda, part 3 (solutions) 1. “raw” Selenium Page Objects 2. Page Factory from Selenium library 3. HMTL Element framework from Yandex 4. Selenide 5. JDI framework from EPAM 6. SWD Page Recorder
  • 6. Agenda, part 4 (take away points) 1. A real-life example 2. “Homework” 3. “Rules” and principles 4. A set of useful links 5. What’s next? 6. Questions
  • 7. Page Object – just to “refresh” 1. Page Objects – encapsulates the way of identification and logical grouping of widgets. 1. Page Object == Logical Page 1. Page Object != Physical Page
  • 8. Page Object – “example” ☺
  • 9. Page Object – “example” ☺
  • 10. State-less or state-full solution? 1. Let’s compare: – Photo • Share – looks like parallelism (easy parallelism). – Video • Share – looks like parallelism (not trivial parallelism).
  • 11. State-less or state-full solution? 1. How easy transform solution from “single” to “multi” threading (to decrease “QA Automation Windows”) 1. State-less – like share a photo 1. Just 5 minutes of work. 2. State-full – like share a video 1. Not trivial task, could be a night mare. 2. Summary 1. prefer state-less solutions to state-full solutions in mooooost cases; 2. before start implementation a state-full solution, please, take a break for a minute, and re-thing everything again, possibly you can find a proper state-less solution.
  • 12. Object or static class State-full or state-less solution? 1. Static class  could be implemented as a state-less solution easily 2. Object  State-full solution in 99,99% cases 3. Summary  prefer static class based solutions (state-less) to object based (state-full) in mooooost cases;  before start implementation based on objects, please, take a break for a minute, and re-thing everything again, possibly you can find a proper solution based on static classes.
  • 13. Page Objects – state-full, general case? 1. Too complicated business logic due to Domain 2. Too complicated business logic due to System size (thousands test- cases) 3. Too many “contexts” • Browser versions • Environments • Customers with a tiny nuances of functionality • Platforms (cross-browser Web plus cross-platform Mobile) • Combination ☺ 1. Combination ☺
  • 14. Page Objects – state-full, special cases 1. Web UI that behaves like a Wizard 2. Web UI in combination with Mobile in one use case 3. Internet of Things (in most cases) 4. More then 1 page during 1 test (for example several portals or several instances of one portal to implement one “business use case”): – Really seldom; – Looks like integration tests (in most cases): • Std solution- some type of White Box Testing. 5. Many others “special cases”
  • 15. How to select a proper PO implementation?
  • 16. Hypothetical project context – to compare 1. 30 Physical Pages 2. Standard Header, footer and search functionality for all physical pages 3. Each Physical Page consists of – Header – H – Footer – F – Search – S – Some functionality, specific for the Page – U (unique)
  • 17. Compare complexity – Static Page Object based 1. 33 Static Page Objects = Logical Pages 2. 0 explicit and 30 implicit Physical Pages 3. Just share 33 Static Page Objects between 30 implicit Physical Pages – For example, Header Static Page Object (static class) is used in test cases for all 30 Physical Page Objects 1. Complexity – just 33 static state-less entities (plus limitations due to state-less solutions)
  • 18. Compare complexity – Dynamic Page Object based (option 1) 1. 33 Dynamic Page Objects = Logical Pages 2. It depends on implementation (one of the ways): – 0 explicit and 30 implicit Physical Pages – implicit Physical Page implements on Action layer (limitations example) – Action for Physical Page aggregates all necessary Dynamic Logical Pages • Physical Pages are implemented in a next way: create all necessary instances of logical pages, aggregate in some way, use Action layer as an point of aggregation in most cases, free resources
  • 19. Compare complexity – Dynamic Page Object based (option 1) 1. 120 objects (min), each with some state, dynamically created and frees to implement necessary behavior - to implement 30 implicit Physical Pages 2. Complexity – 120 dynamic, state-full entities min (plus some limitations due to state-full solution implementation nuances)
  • 20. Compare complexity – Dynamic Page Object based (option 2) 1. 33 Dynamic Page Objects = Logical Pages 2. It depends on implementation (another way): – 30 explicit Physical Pages – Multiple Interface inheritance – Combine Page Objects and Actions layer (in most cases) – Action-Physical Page (limitations example) • Implements all Logical Pages interfaces using aggregation and “delegation” • Aggregate all Dynamic Logical Page Objects • Create and frees resources (Dynamic Logical Page Objects)
  • 21. Compare complexity – Dynamic Page Object based (option 2) 1. 150 objects, each with some state, dynamically created and frees to implement necessary behavior - to implement 30 explicit Physical Pages 2. Complexity – 150 dynamic, state-full not trivial entities with a multiple interface inheritance (plus some limitations due to state-full solution implementation nuances)
  • 22. Compare “tech” limitations - Static Page Object based 1. Can be used together with next Design Patterns Approaches – Action (both static – preferable and dynamic) – Key-word driven – DSL – external only – BDD – partially, it depends on exact BDD engine implementation limitations 2. Can’t be used together with next Design Patterns – Factory – Flow (Fluent Interface) – Navigator (for Web)
  • 23. Compare “tech” limitations - Dynamic Page Object based 1. No limitations, but … – For example, in most cases it’s hard to isolate Action and Page Objects layers
  • 24. Compare “business” limitations - Static 1. Too complicated business logic due to Domain 2. Too complicated business logic due to System size (thousands test-cases) 3. Too many “contexts” – Browser versions – Environments – Customers with a tiny nuances of functionality – Platforms (cross-browser Web plus cross-platform Mobile) – Combination ☺ 1. Combination ☺
  • 25. Rationale “business” limitations - Static 1. State-less approach - you have a conditional that chooses different behavior depending on … 2. Solution to simplify the project – refactoring “Replace Conditional with Polymorphism” 3. Polymorphism = object = State-full approach
  • 26. Rationale “business” limitations - Static 1. “From refactoring to Patterns” – There is a set of specific Design Patterns 2. The trickiest part – find a balance for your project now and update point of balance in time
  • 27. Compare “business” limitations - Dynamic 1. Relatively simple business logic due to Domain 2. Relatively simple business logic due to System size (hundreds test-cases) 3. Not so many “contexts” – Browser versions – Environments – Customers with a tiny nuances of functionality – Platforms (cross-browser Web plus cross-platform Mobile)
  • 28. Rationale “business” limitations - Dynamic 1. State-full approach - you have a set of objects classes, which developed, possibly, using several Design Patterns to implement necessary functionality – to choose different behavior depending on … 2. Solution to simplify the project – refactoring “Replace Polymorphism with Conditional” 3. Polymorphism ~= object ~= State-full approach 4. No Polymorphism ~= no objects ~= State-less approach
  • 29. Rationale “business” limitations - Dynamic 1. “From Patterns to refactoring” – There is no need to use a set of specific Design Patterns 2. The trickiest part – find a balance for your project now and update point of balance in time
  • 30. Find and “update” a balance for your own project
  • 31. Page Factory from Selenium library
  • 32. Page Factory - definition 1. Page Factory is an inbuilt page object model concept for Selenium WebDriver but it is very optimized. 2. We use initElements method to initialize web elements 1. Additionally with the help of PageFactory class - use annotations @FindBy to find WebElement. 2. @FindBy can accept as attributes: 1. tagName 2. name 3. partialLinkText 4. linkText 5. Id 6. Css 7. className 8. Xpath
  • 33. Page Factory - notes 1. If you use the PageFactory, you can assume that the fields are initialized. If you don't use the PageFactory, then NullPointerExceptions will be thrown if you make the assumption that the fields are already initialized. 2. List<WebElement> fields are decorated if and only if they have @FindBy or @FindBys annotation. Default search strategy "by id or name" that works for WebElement fields is hardly suitable for lists because it is rare to have several elements with the same id or name on a page.
  • 34. Page Factory - notes • WebElements are evaluated lazily. That is, if you never use a WebElement field in a PageObject, there will never be a call to "findElement" for it. • The functionality works using dynamic proxies. This means that you shouldn't expect a WebElement to be a particular subclass, even if you know the type of the driver. For example, if you are using the HtmlUnitDriver, you shouldn't expect the WebElement field to be initialized with an instance of HtmlUnitWebElement.
  • 35. Login Page 1.public class LoginPage { 2. private WebDriver driver; 3. @FindBy(id = "id_username") 4. private WebElement usernameInput; 5. @FindBy(id = "id_password") 6. private WebElement passwordInput; 7. @FindBy(id = "main_action_form_button") 8. private WebElement loginButton; 9.}
  • 36. Login Page 1. public class LoginPage { 2. public LoginPage(WebDriver driver) { 3. this.driver = driver; 4. PageFactory.initElements(driver, this); 5. } 6. public void login(String username, String password) { 7. usernameInput.sendKeys(username); 8. passwordInput.sendKeys(password); 9. loginButton.click(); 10. } 11. }
  • 37. Home Page 1. public class HomePage { 2. private WebDriver driver; 3. @FindBy(css = "a[href*="login"]") 4. private WebElement loginButton; 5. public HomePage(WebDriver driver) { 6. this.driver = driver; 7. PageFactory.initElements(driver, this); 8. } 9. }
  • 38. Home Page 1. public class HomePage { 2. public void login() { 3. login(Creds.username, Creds.password);} 4. private LoginPage clickLoginButton() { 5. loginButton.click(); 6. return new LoginPage(driver);} 7. private void login(String username, String password) { 8. LoginPage loginPage = clickLoginButton(); 9. loginPage.login(username, password);
  • 39. Login test 1. public class LoginTest { 2. private WebDriver driver; 3. @BeforeMethod 4. public void setup() { 5. driver = new FirefoxDriver(); 6. driver.manage().window().maximize(); 7. driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 8. driver.get("https://www.pandadoc.com/");} 9. @AfterMethod 10. public void teardown() { 11. driver.close();}}
  • 40. Login test 1. public class LoginTest { 2. private void assertSignedUp() { 3. new WebDriverWait(driver, 30000).until(ExpectedConditions.visibilityOfElementLocated(By.cs sSelector(".header-avatar")));} 4. @Test 5. public void loginTest() { 6. HomePage homePage = new HomePage(driver); 7. homePage.login(); 8. assertSignedUp();}}
  • 41. Implementation is based on • Reflection • Annotation • Templates
  • 42. Page Factory from Selenium library - info Page Object Model and Page Factory Page Factory detailed desription Page Object (Page Factory context) AjaxElementLocatorFactory (obsolete) Source code example PageFactory.java (source code) Book with a brief summary of Selenium WebDriver plus Java bindings (Ru only)
  • 43. HMTL Elements framework from Yandex • Designed to provide easy-to-use way of interaction with web-page elements in your tests. • It may be considered as an extension of WebDriver Page Object (PageFactory). • With the help of Html Elements framework you can group web- page elements into blocks (Logical Pages), encapsulate logic of interaction with them and then easily use created blocks in page objects (Physical Pages).
  • 44. HMTL Elements framework from Yandex • Dividing page on blocks using @Block annotation • Separating different types of elements (button, checkbox) • Provides an ability to annotate methods as steps – annotation @Step for work in step-based style • Provides a set of helpful matchers to use with web-page elements and blocks
  • 45. Login Page 1. public class LoginPage { 2. private WebDriver driver; 3. @FindBy(id = "id_username") 4. private static TextInput usernameInput; 5. @FindBy(id = "id_password") 6. private static TextInput passwordInput; 7. @FindBy(id = "main_action_form_button") 8. private static Button loginButton; 9. }
  • 46. Login Page 1. public class LoginPage { 2. public LoginPage(WebDriver driver) { 3. this.driver = driver; 4. HtmlElementLoader.populatePageObject(this, driver); 5. } 6. public void login(String username, String password) { 7. usernameInput.sendKeys(username); 8. passwordInput.sendKeys(password); 9. loginButton.click(); 10. } 11. }
  • 47. Home Page 1. public class HomePage { 2. private WebDriver driver; 3. @FindBy(css = "a[href*="login"]") 4. private static Button loginButton; 5. public HomePage(WebDriver driver) { 6. this.driver = driver; 7. HtmlElementLoader.populatePageObject(this, driver); 8. } 9. }
  • 48. Home Page 1. public class HomePage { 2. public void login() { 3. login(Creds.username, Creds.password); } 4. private LoginPage clickLoginButton() { 5. loginButton.click(); 6. return new LoginPage(driver); } 7. private void login(String username, String password) { 8. LoginPage loginPage = clickLoginButton(); 9. loginPage.login(username, password);}}
  • 49. Login test 1. public class LoginTest { 2. private WebDriver driver; 3. @BeforeMethod 4. public void setup() { 5. driver = new FirefoxDriver(); 6. driver.manage().window().maximize(); 7. driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 8. driver.get("https://www.pandadoc.com/"); } 9. @AfterMethod 10. public void teardown() { 11. driver.close(); }}
  • 50. Login test 1. public class LoginTest { 2. private WebDriver driver; 3. private void assertSignedUp() { 4. new WebDriverWait(driver, 30000).until(ExpectedConditions.visibilityOfElementLocated(By.cs sSelector(".header-avatar"))); } 5. @Test 6. public void loginTest() { 7. HomePage homePage = new HomePage(driver); 8. homePage.login(); 9. assertSignedUp(); }}
  • 51. Implementation is based on • Reflection • Annotation • Templates
  • 52. HMTL Elements framework from Yandex - info • Official site of the tool • Examples • Source code example • Book with a brief summary of Selenium WebDriver plus Java bindings (Ru only)
  • 53. Selenide Selenide is a wrapper for Selenium Webdriver, oriented, as Geb, on fast and laconic automation but using Java. Just focus on your business logic and let Selenide do the rest! Main advantages of that tool: • Concise fluent API for tests • True Page Objects
  • 54. Selenide 1. Webdriver access 2. jQuery style selectors 3. Ajax support for stable tests 4. Auto-start and browser destructions 5. You don't need to think how to shutdown browser, handle timeouts and StaleElement Exceptions or search for relevant log lines, debugging your tests.
  • 55. Login Page 1. public class LoginPage { 2. private static final By USERNAME_INPUT = By.id("id_username"); 3. private static final By PASSWORD_INPUT = By.id("id_password"); 4. private static final By LOGIN_BUTTON = By.id("main_action_form_button"); 5. public void login(String username, String password) { 6. $(USERNAME_INPUT).val(username); 7. $(PASSWORD_INPUT).val(password); 8. $(LOGIN_BUTTON).click(); 9. }}
  • 56. Login Page Source code – where …?
  • 57. Home Page 1. public class HomePage { 2. private static final By LOGIN_BUTTON = By.cssSelector("a[href*="login"]"); 3. public void login() { 4. login(Creds.username, Creds.password); } 5. private LoginPage clickLoginButton() { 6. $(LOGIN_BUTTON).click(); 7. return page(LoginPage.class);} 8. private void login(String username, String password) { 9. LoginPage loginPage = clickLoginButton(); 10. loginPage.login(username, password); }}
  • 58. Home Page Source code – where …?
  • 59. Login test public class LoginTest { private HomePage homePage; private void assertSignedUp() { $(By.cssSelector(".header-avatar")).waitUntil(Condition.visible, 30000); } @BeforeMethod public void setup() { Configuration.timeout = 10000; homePage = open("https://www.pandadoc.com/", HomePage.class); } @Test public void loginTest() { homePage.login(); assertSignedUp(); } }
  • 60. Login test Source code – where …?
  • 61. Implementation is based on • Reflection • Annotation • Templates
  • 62. Selenide - info • Official site of the tool • Examples • Source code example • Book with a brief summary of Selenium WebDriver plus Java bindings (Ru only)
  • 63. GDI – from EPAM Systems JDI Goals 1. Accumulate best practices of UI automation (open source, page objects, logging, parallelism etc.) 2. Multiplatform framework 3. Intuitive test framework 4. Stable framework 5. Flexible framework
  • 64. GDI features • Interfaces based elements • Complex UI Objects • Simple + Complex UI elements + standard Forms = 31 • Cascade UI Objects Initialization • Multiplatform • Logging for all actions • Stabilization mechanism • Wide Customization abilities • Module-based architecture • Parallel test runs support
  • 65. PageObject “infrastructure” UI Objects – UI elements for Web (Button, Label, Table…) – IU elements for other platforms (any UI) – “Standard” PageObjects • Form • Search • Pagination • Login • others Page Objects – UI elements – Actions with UI elements
  • 66. Simple UI Elements – 10 1. Text 2. Button/Label 3. Link 4. Image 5. Checkbox 6. TextField 7. DatePicker 8. FileInput 9. TextArea 10. And others :)
  • 67. Complex UI Elements – 12 • Selector • RadioButtons • Dropdown • Tabs/Menu • CheckList • DropList • ComboBox • TextList • Table • Tree • Range • And others :)
  • 68. Standard Pages - 9 • Page • Section • Form • Pop • PopupForm • Search • Pagination • NavigationPane
  • 69. PageObject std example, 1 (GDI) @JPage(url = "http://www.epam.com") public class JacketPage extends WebPage { @FindBy(css=“someSelector") public Menu menu; @FindBy(css="someSelector") public CheckList sizes; @FindBy(css=" someSelector") public Button searchButton; @FindBy(css=" someSelector") public Table results; }
  • 70. Test std example, 1 (GDI) 1. @Test 2. public void menuTest() { 3. menu.select("Man"); 4. sizes.check("M", "L"); 5. searchButton.click(); 6. Assert.areEquals(results.rows().count(), 4); 7. Assert.isNotEmpty(results.row("Best Jacket", column("Title"))); 8. }
  • 71. PageObject std example, 1 (Selenium) public class JacketPage { @FindBy(css="") public List<WebElement> menuElements; @FindBy(css="") public WebElement menuIsSelected; @FindBy(css="") public List<WebElement> sizesElements; @FindBy(css="") public WebElement sizesIsChecked; @FindBy(css="") public List<WebElement> sizesLabels; @FindBy(css="") public WebElement searchButton; @FindBy(css="") public List<WebElement> resultsColumnHeaders; @FindBy(css="") public List<WebElement> resultsRowsHeaders; @FindBy(css="") public List<WebElement>resultsCellsHeaders; @FindBy(css="") public List<WebElement> resultsColumn; @FindBy(css="") public List<WebElement> resultsRow; … }
  • 72. PageObject std example, 1 (Selenium) public class JacketPage { @FindBy(css="") public List<WebElement> menuElements; ... @FindBy(css="") public List<WebElement> resultsRow; public void selectElementFromMenu(String name) { … } public String getSelectedMenuItem() { … } public boolean isMenuItemSelected(String name) { … } public void selectElementFromMenu(String name) { … } … public int getResultsCount() { … } public boolean isResultPresent(String name) { … } public WebElement getSomeAttributeForResult(String name) { … } … public List<WebElement> findAllResultsMatch(String name) { … } }
  • 73. PageObject std example, 2 (GDI) 1. @JPage(url = "/login", title = "EPAM - Login page") 2. public class LoginPage extends PageForm { 3. @FindBy(css = “.login”) private ITextField login; 4. @FindBy(css = “.password”) private ITextField password; 5. @FindBy(css = “.loginButton”) private IButton loginButton; 6. }
  • 74. Test std sexample, 2 (GDI) 1. @Test 2. public void exampleTest(String searchText) { 3. loginPage.login(client); 4. searchPage.search(searchText); 5. resultsPage.results.eachContains(searchText); 6. resultsPage.openFirstResult(); 7. productPage.check.productHasNoEmptyData(); 8. }
  • 75. Test std example, 3 (GDI) @Test public void shopTest() { loginPage.open(); loginForm.login(new User(“user", "password")); search.find("best jacket"); productForm.submit(Products.TestJacket); pagination.next(); pagination.selectPage(5); }
  • 76. PageObject std example, 4 (GDI, “model” based) 1. public class LoginForm extends Form<User> { 2. @FindBy(css=“someLocator") 3. public TextField name; 4. @FindBy(css=“someLocator") 5. public TextField password; 6. @FindBy(css=“someLocator") 7. public Button loginButton; 8. }
  • 77. PageObject std example, 4 (GDI, “model” based) public class User { public String name; public String password; public User(String name, String password) { this.name = name; this.password = password; } }
  • 78. PageObject std example, 5 (GDI) 1. @JSite(domain = "https://www.epam.com") 2. public class EpamSite extends WebSite { 3. @JPage(url = "/") 4. public static HomePage homePage; 5. @JPage(url = "/careers", title = "Careers") 6. public static CareerPage careerPage; 7. @JPage(url = "/careers/job-listings", title = "Job Listings", 8. urlCheckType = CONTAIN, titleCheckType = CONTAIN) 9. public static JobPage jobPage; 10.... 11.} WebSite.init(EpamSite.class);
  • 79. “Forms” Page Object (GDI) 1. public class AddCVForm extends Form<Attendee> { 2. @FindBy(css = “.first-name“) private ITextField name; 3. @FindBy(css = “.last-name“) private ITextField lastName; 4. @FindBy(css = “.email“) private ITextField email; 5. @FindBy(css = “.file-upload“) private RFileInput cv; 6. @FindBy(css = “.comment-input“) private ITextArea comment; 7. @FindBy(xpath = “//*[.='Submit']“) private IButton submit; 8. @FindBy(xpath = “//*[.='Cancel']“) private IButton cancel; 9. }
  • 80. Entities driven testing (GDI) @Test(dataProvider = “attendees”) public void menuTest(Attendee attendee) { searchFilter.fill(attendee); checkSuggestionsContains(attendee); searchFilter.search(attendee); assertEquals(results.rows().count(), 1); results.row(attendee.name, column(“Name”)) addCVForm.submit(attendee.cv); checkCVInDB(attendee.cv); previewForm.verify(attendee); }
  • 81. Java examples public class HomePage extends WebPage { @FindBy(css="div.tabs-ui[data-path*= '/content/epam/en/jcr:content/content_container/ section_4/section-par/tabs']") public EpamCoreSection epamCoreSection; }
  • 82. Java examples public class EpamCoreSection extends Section { @FindBy(css="div.tab-1>div.text>div.text-ui >p>span.font-size-26") public Text whoWeAreText; @FindBy(css="div.tab-2>div.text>div.text-ui >p>span.font-size-26") public Text whatWeDoText; @FindBy(css="div.tab-3>div.text>div.text-ui >p>span.font-size-26") public Text whoWeServeText; @FindBy(xpath="//div[.='Who we serve']") public Button whoWeServe; @FindBy(xpath="//div[.='Who we are']") public Button whoWeAre; @FindBy(xpath="//div[.='What we do']") public Button whatWeDo; }
  • 83. Java examples @Test public void presentationSimpleTest() { homePage.checkOpened(); homePage.epamCoreSection.whoWeAre.highlight(); homePage.epamCoreSection.whoWeAreText.highlight(); new Check("Tab text").areEquals("" + "We are more than developers. We are the experts that will take your business into the digital future.", homePage.epamCoreSection.whoWeAreText.getText()); homePage.epamCoreSection.highlight(); homePage.epamCoreSection.whoWeServe.highlight(); homePage.epamCoreSection.whoWeServe.click(); }
  • 84. Java examples @Test public void presentationComplexTest() { homePage.checkOpened(); textToTest(HomeTabs.WHATWEDO,homePage.epamCoreSection); textToTest(HomeTabs.WHOWEARE,homePage.epamCoreSection); textToTest(HomeTabs.WHOWESERVE,homePage.epamCoreSection); }
  • 85. Java examples public void textToTest(HomeTabs tab, EpamCoreSection epamCoreSection){ switch (tab) { case WHOWEARE: chooseTab(epamCoreSection.whoWeAre, epamCoreSection.whoWeAreText, HomeTabsTextToCheck.WHOWEARE); break; case WHATWEDO: chooseTab(epamCoreSection.whatWeDo, epamCoreSection.whatWeDoText, HomeTabsTextToCheck.WHATWEDO); break; case WHOWESERVE: chooseTab(epamCoreSection.whoWeServe, epamCoreSection.whoWeServeText, HomeTabsTextToCheck.WHOWESERVE); break; } }
  • 86. Java examples public void chooseTab(Button tab, Text text, String textToCheck){ tab.highlight(); tab.click(); text.highlight(); new Check("Tab text").areEquals(textToCheck, text.getText()); }
  • 87. Java examples public static class HomeTabsTextToCheck { public static final String WHOWEARE="We are more than developers." + " We are the experts that will take your business into the digital future."; public final static String WHATWEDO="We transform businesses through the art of digitization." + " Our expertise spans multiple disciplines," + " providing our clients with software solutions that dramatically drive results and outcomes."; public final static String WHOWESERVE="The right technology translates business strategies into results." + " We deliver domain-specific, transformative software solutions that reshape the way you do business."; }
  • 88. Customization 1. Customize method’s behavior 2. Customize element’s behavior 3. Customize all objects behavior 4. Develop new UI element 5. Modules • Logger • Asserter • Driver • etc.
  • 89. Architecture Modules structure
  • 90. Architecture Modules structure
  • 91. Implementation is based on Implementation is based on … what? Let’s: • download source code • familiarize • investigate • develop a tiny prototype • try to use • try to improve (for example, add Decorator DP based features) • welcome to QA Automation tools development • welcome to Open Source
  • 92. JDI - info • http://jdi.epam.com/ • http://jdi.epam.com/download • https://github.com/epam/JDI/tree/master/Java/Tests • https://github.com/epam/JDI/tree/master/Java • https://github.com/epam/JDI/tree/master/C%23.Net/Tests • https://github.com/epam/JDI/tree/master/C%23.Net • IT-Saturday video (Ru only) • “JDI - EPAM Framework (IT-Subbotnik, with listings).pptx” (RU) • “JDI - QA Conf 2016.pptx” (Ru) • “JDI – Secon 2016.pptx” (EN)
  • 93. Serenity (ex. Thucydides) 1. Serenity (Thucydides) – is an open-source tool, oriented on effective acceptance testing and detailed documentation and reports of the project. 2. It works with Junit and BDD tools like JBehave and Cucumber-JVM, and gives a wide API for automated testing with integrity with Selenium Webdriver. 3. It is made for the following tasks: • Creating more flexible tests, which are easier to be supported • Getting illustrated story-based reports • Clear context of connection between tests and requirements • Measurement of requirements coverage.
  • 94. Serenity (ex. Thucydides) workflow • Step 1: Defining requirement and acceptance criteria It starts from requirements, which are need to be tested. For every requirement there is an acceptance criteria which describing the requirement better. Thucydides automate acceptance criteria • Step 2: Modelling the requirements With the help of Thucydides you create a simple model of requirements made on Java language. There are some ways of modelling requirements, including simple Java class, using convention and structure of directories of integrating with other tools like Jira. That approach allows the developer what requirement is tested each of the test, and give Thucydides the ability to track testing features and requirements
  • 95. Serenity (ex. Thucydides) workflow • Step 3: Automation of acceptance testing Next is describing acceptance criteria by business language is following, and automation engineers implement them using BDD such as jBehave or Cucumber-JVM, or using Java and Junit, in order for Thucydides to run it with “pending” status (body is not implemented) • Step 4: Test implementation Automation Engineers now can implement acceptance criteria in a form of real-time AUT test. Tests can be divided into steps for better readability and easiness of support. Webdriver is used for testing.
  • 96. Serenity (ex. Thucydides) workflow • Step 5: Test results report Thucydides allow you to create detailed test reports about test runs, including: History for ach test Screenshot for each test step Result of test run including time and error messages • Step 6: Requirements coverage report Besides test run reports, Thucideds also provide information about: Number of tested requirements Number of passed requirements Number of requirements which need to be run
  • 97. Serenity (ex. Thucydides) workflow • Step 7: Project progress report Thucydides provide information about project history progress: Change in number of features implemented in time Change in quantity of implemented and tested features in time Change of failed tests in time • Summary As we can see, Thucydides is a rather complex tool, build around BDD concept and acceptance testing, using Webdriver for testing web applications. • Info Official website Official documentation
  • 98. Page Object And what about Page Object supports …?
  • 99. Page Object “default” implementation Framework implements Page Object pattern and let’s you decrease code duplication another one type of classes between tests and pages, called “steps”. Let’s look at “steps” with page object class: 1. public class StepsinBook extends ScenarioSteps { 2. public StepsinBook(Pages pages) { 3. super(pages); 4. } 5. public BookPage getPageBook() 6. { 7. return getPages().currentPageAt(BookPage.class); 8. } 9. }
  • 100. Page Object “default” implementation 1. public class StepsinBook extends ScenarioSteps { 2. @Step public void getMain(String url) 3. { 4. getPageBook().getMainPage(url); 5. } 6. @Step public void AllBooks() 7. { 8. getPageBook().allBooks(); 9. } 10. @Step public void search(){ 11. getPageBook().search(“Book"); 12. } 13. @Step public void catalog(){ 14. getPageBook().catalog(); 15. }}
  • 101. Page Object “default” implementation 1. public class BookPage extends PageObject { 2. @FindBy(linkText = “All books") 3. WebElement allbooksButton; 4. @FindBy(linkText = “Search") 5. WebElement searchButton; 6. @FindBy(name = "query") 7. WebElement searchField; 8. @FindBy(css = "button") 9. WebElement searchBegin; 10. }
  • 102. Page Object “default” implementation 1. public class BookPage extends PageObject { 2. public BookPage(WebDriver driver) { 3. super(driver); 4. } 5. public void getMainPage(String url) { 6. getDriver().get(url); 7. } 8. public void allBooks() { 9. allbooksButton.click(); 10. } 11. public void search(String searchWord) { 12. searchButton.click(); 13. searchField.sendKeys(searchWord); 14. searchBegin.click(); 15. } 16. }
  • 103. Implementation is based on • Reflection • Annotation • Templates
  • 104. Geb – general info 1. Tool for browser automation, made on Groovy (JVM-based) and based on Selenium Webdriver. 1. It using: 1. Selenium for browser automation 2. jQuery selectors for locating elements 3. Page object pattern . 2. In the bounds of testing it can be easily integrated with different test frameworks like: 1. Junit 2. TestNG 3. Spock
  • 105. Geb – general info If to compare with Webdriver API, Geb provides more comfortable interface in the following areas: • Working with Webdriver instance (creating, configuration, moves, destruction) • Locating elements (jQuery locators) • Page object pattern • Waiters • Page interactions • Work with AJAX elements • Integration with build-tools (maven, gradle, grails) • Integration with cloud services (Sauce labs, Browser Stack) Official website Official documentation
  • 106. Geb - example 1. import geb.Browser 2. Browser.drive { 3. go "http://myapp.com/login" 4. assert $("h1").text() == "Please Login" 5. $("form.login").with { 6. username = "admin" 7. password = "password" 8. login().click() 9. } 10. assert $("h1").text() == "Admin Section" 11. }
  • 107. SWD Page Recorder 1. SWD Page Recorder helps you to create locators of web-page, debug them in the application and generate PageObject code for classes on C#, Java, Python, Ruby, Perl for using them in Selenium Webdriver tests. 2. That tool not only lets you find locator needed, but also optimize it and generate all the code needed for further element declaration in the code. 3. SWD Page Recorder is a unified tool for working with locators in every browser which are supported by Selenium. 4. Important moment that Page Recorder tests the selectors using Webdriver – so you’re not going to have cases when locator find other way will not work in Webdriver.
  • 108. SWD Page Recorder Sources, documentation and so on
  • 109. How to select an appropriate solution?
  • 110. A real-life example 1. Business context 2. Tech context – Challenge – Solution – Technology Stack 3. QA Automation process context 4. Source code example 5. Summary
  • 111. Example 1. Example and “home work” – How to setting up environment • This is task 0 ☺ – Where to download (https://github.com/comaqaby/Patterns/tree/master/C%23) – How to build – How to configure – How to run
  • 112. “Homework”, part 1 ☺ 1. Download example’ source code (for each “solution”) 2. “Investigate” 3. Develop a TODO list with a set of improvements 4. Setting up environment 5. Compile and Run 6. “Play” 7. Improve Update TODO list with a set of improvements
  • 113. “Homework”, part 2 ☺ 1. Read recommended books and articles 2. Improve Update TODO list with a set of improvements 3. Provide me via email with an intermediate and final list of improvements 4. Develop at least 1 more auto-test (for each “solution”) 5. Develop a set of metrics to “compare” solutions 6. Develop an algorithm “How to select a proper solution” 7. Provide me via email with a set of metrics + algorithm 8. Next iteration ☺
  • 114. “Homework”, part 3 ☺ 1. Play with GDI “attentively” 2. Join QA Automation tools development 3. Join Open Source “world”
  • 115. “Rules” and principles 1. Could you please “refresh” your theoretical knowledge, slides 1- 31, thanks
  • 116. Useful links 1. Martin Fowler “Refactoring” – http://martinfowler.com/books/refactoring.html – http://refactoring.com/ – http://refactoring.com/catalog/ – http://refactoring.com/catalog/replaceConditionalWithPolymorphism.h tml
  • 117. Useful links 1. Refactoring to Patterns and vice versa – https://industriallogic.com/xp/refactoring/ – https://industriallogic.com/xp/refactoring/catalog.html – https://industriallogic.com/xp/refactoring/conditionDispatcherWithCo mmand.html – https://industriallogic.com/xp/refactoring/conditionalWithStrategy.html – http://martinfowler.com/books/r2p.html
  • 118. Useful links 1. https://sourcemaking.com/ – https://sourcemaking.com/refactoring – https://sourcemaking.com/refactoring/replace-conditional-with- polymorphism – https://sourcemaking.com/design_patterns – https://sourcemaking.com/antipatterns • https://sourcemaking.com/antipatterns/software-development-antipatterns • https://sourcemaking.com/antipatterns/software-architecture-antipatterns – https://sourcemaking.com/uml
  • 119. Tech “basement” • Grady Butch «Object oriented analysis and design with examples of apps on C++ Notes: IMHO No need to be afraid of C++, 95% of the material is conceptual, there is no strict connection to chosen language. From my point of view is one of the best books for true getting to know with OOP. • Martin Fowler «Refactoring» Notes: IMHO strongly recommend to read from cover to cover, twice, in order to have contents of the book – you active professional luggage. • Gang of four “Design patterns” Notes: IMHO strongly recommend to read from cover to cover, twice, in order to have contents of the book – you active professional luggage.
  • 120. Tech “basement” • D. Thomas, Andrew Hunt “Pragmatic Programmer, The: From Journeyman to Master” Notes: IMHO Amazing book that consists of a ton of advices. IMHO strongly recommend to read from cover to cover, twice, in order to have contents of the book – you active professional luggage. And then look through different chapters before talking to a customer. • Steve McConnel “Code complete” Notes: IMHO No need to be afraid of the size of the book ... it should be read or before “going to bed”, or from any place, of separate chapters, just to fresh things in the memory in the chosen f ield of problem.
  • 121. What’s next?! • “Out of box Page Object Design Pattern, Java” • Dynamic solutions • Let’s compare with a static one • “Out of box Page Object Design Pattern, .Net C#” • Dynamic solutions • Let’s compare with a static one Summary: 5/12 - Webinar, 5/13 – send all necessary materials • “Variants of implementation Page Object Design Pattern from the scratches, without being bind to any programming language” • Static solutions • Dynamic solutions • Let’s compare static and dynamic • Answer to all our questions Summary: 5/19 - Webinar, 5/19 – send all necessary materials
  • 122. Anton_Semenchenko@epam.com Skype - semenchenko_anton_v +375 33 33 46 120 +375 44 74 00 385 https://www.linkedin.com/in/anton-semenchenko-612a926b https://www.facebook.com/semenchenko.anton.v https://twitter.com/comaqa www.comaqa.by www.corehard.by