Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

FluentLenium

8,032 views

Published on

Published in: Technology

FluentLenium

  1. 1. FluentLenium,une autre façon de faire du selenium by Mathilde Lemée @MathildeLemee 1
  2. 2. Mathilde Lemée@MathildeLemee 2
  3. 3. Selenium 3
  4. 4. FluentLenium 4
  5. 5. 1. Optimiser lécriture 5
  6. 6. Selectors CSS > XPath• find("#monId")• find(".maClass")• find("maBalise")• find("input[class=rightForm]") 6
  7. 7. Custom Selectors• find(".small", withName("foo"))• find(".small", withId("idOne"))• find(".small", withText("This field")• find(".small", withId().notStartsWith("id"))• find(".small", withName().contains(regex("na?me[0-9]*")) 7
  8. 8. Selectors• findFirst(myCssSelector)• find(myCssSelector, 2)• find(myCssSelector, 2, withName("foo"))• find(myCssSelector, 2, withName("foo")).find("input", withName("bar")) 8
  9. 9. II. Faciliter les interactions 9
  10. 10. Actions• click("#create-button")• clear("#firstname")• submit("#account")• fill("#firstname").with("Mathilde")• find("#monId").click()• executeScript("alert(Devoxx);"); 10
  11. 11. III. Garantir la maintenance 11
  12. 12. 12
  13. 13. // If youre reading this, that means you havebeen put in charge of my previous project.// I am so, so sorry for you. God speed. 13
  14. 14. Page Object Pattern 14
  15. 15. 15
  16. 16. 16
  17. 17. IV. Améliorer la gestion AJAX 17
  18. 18. 18
  19. 19. 19
  20. 20. 20
  21. 21. V. Simplifier les assertions 21
  22. 22. 22
  23. 23. VI. Jquery Style 23
  24. 24. 24
  25. 25. Merci @MathildeLemeehttp://www.fluentlenium.org 25

×