Содержание
- 2. PLAN UI Objects. JDI JDI. Composite elements JDI Settings JDI for any UI
- 3. JDI ? Simple Test UI Objects Simple Elements Complex Elements AGENDA
- 4. JDI?
- 5. JDI SETUP README http://jdi.epam.com/ https://github.com/epam/JDI https://vk.com/jdi_framework
- 6. JDI SETUP
- 7. DEMO: TEST PROJECT FROM SCRATCH
- 8. test.properties log properties ui objects test init tests STRUCTURE
- 9. SIMPLE TEST ProductPage.productType.select(«jacket»); ProductPage.price.select(«500$»); ProductPage.colors.check(«black», «white»); Assert.isTrue(ProductPage.label.getText(), «Armani Jacket»)
- 10. SIMPLE TEST LoginPage.open(); LoginPage.loginForm.login(admin); SearchPage.search.find(«Cup»); Assert.AreEqual(ResultsPage.products.count(), expected);
- 11. DEMO: JDI UI OBJECTS
- 12. PAGE ELEMENTS
- 13. PAGE OBJECTS
- 14. PAGE ELEMENTS
- 15. ELEMENTS Simple Complex Composite
- 16. SIMPLE ELEMENTS
- 17. SIMPLE ELEMENTS @FindBy (css=“.description”) public Text description; public Button submit; public Label productName; public Link followMe;
- 18. SIMPLE ELEMENTS @FindBy (css=“.btn”) public Button submit; @FindBy (css=“.btn”) @FindBy (xpath=“//button”) @FindBy (id=“button-id”) @FindBy (name=“button”) public
- 19. PLATO'S THEORY OF FORMS 5 No application but you can write UI Objects (Page Objects )
- 20. DEMO: SIMPLE ELEMENTS
- 21. DEMO: JFINDBY ANNOTAION
- 22. COMPLEX ELEMENTS
- 23. COMPLEX ELEMENTS public Dropdown colors; public Checklist settings; public ComboBox tags; public DropList shirtSizes; public List
- 24. COMPLEX ELEMENTS @JDropdown ( root = @FindBy(css = “.colors"), value = @FindBy(css = “.value"), elementByName =
- 25. COMPLEX ELEMENTS @FindBy(css = “.colors") public Dropdown colors; @FindBy(css = “.table”) public Table offers; @FindBy(css =
- 26. USING ENUMS
- 27. ENUMS IN COMPLEX ELEMENTS public Menu topMenu; public enum Options { Home, About, Contacts } public
- 28. DEMO: COMPLEX ELEMENTS
- 29. Code readability Clear behavior Union of all element’s locators Union of element and its actions Detailed
- 30. Text Description; Button Submit; Label ProductName; Link FollowMe; TextField Password; TextArea Abuse; CheckBox RememberMe; DatePicker Date;
- 31. COMPARE @JDropdown (root = @FindBy(css = “.colors"), value = @FindBy(css = “.value"), elementByName = @FindBy(tagName =
- 32. COMPARE @FindBy (id = “trades") public Table Colors; @FindBy(css = "") private List resultsColHeaders; @FindBy(css =
- 33. DEMO: TYPIFIED ELEMENTS
- 34. UI Objects. JDI JDI. Composite elements JDI Settings JDI for any UI NEXT
- 36. Скачать презентацию