Your SlideShare is downloading. ×
0
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Streamline Selenium Testing with Page Flow Navigation
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Streamline Selenium Testing with Page Flow Navigation

778

Published on

Join us to learn how to significantly reduce the time needed to write and maintain Selenium tests by using page flows to encapsulate the navigational elements in your application. We'll show you how …

Join us to learn how to significantly reduce the time needed to write and maintain Selenium tests by using page flows to encapsulate the navigational elements in your application. We'll show you how common, multi-page UI actions in Selenium tests can be abstracted into page flows. With a page flow, developers can cut to the chase in a testing scenario, bypassing the setup often needed to navigate to the beginning of your testable action. Leave knowing what you need to add a high value, low maintenance Selenium test suite to your arsenal.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
778
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
29
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Streamline lenium Testing with Page Flow navigation Ted Husted, NimbleUser, Release Engineer @tedhusted Derek Hansen, NimbleUser, Lead Engineer @nimblederek
  • 2. Safe harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  • 3. Source code license - BSD2 Copyright (c) 2013, NimbleUser All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of NimbleUser nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE https://bitbucket.org/nimbleams/open-nu-selenium
  • 4. Ted Husted Release Engineer, NimbleUser @tedhusted
  • 5. Derek Hansen Lead Engineer, NimbleUser @nimblederek
  • 6. hands up
  • 7. unit test Apex code?
  • 8. test Visualforce page workflows?
  • 9. use other test tools for Visualforce pages?
  • 10. run Selenium tests?
  • 11. Selenium in action (self-running demo)
  • 12. why automate UI testing?
  • 13. why not automate UI testing?
  • 14. why use Selenium?
  • 15. just do it
  • 16. public void testNew() throws Exception { driver.get("http://www.test.com"); driver.findElementBy(How.ID,"loginForm:tbUsername") .sendKeys(“J.Doe”); driver.findElementBy(How.ID,"loginForm:tbPassword") .sendKeys(“Sup3rDup3r”) .submit(); // ... }
  • 17. public void testNew() throws Exception { driver.get("http://www.test.com"); driver.findElementBy(How.ID,”loginForm:tbUsername") .sendKeys(“jackbenimble"); driver.findElementBy(How.ID,”loginForm:btnLogin") .submit(); driver.findElementBy(How.ID, ”adminHomeForm:_activitynew").submit(); driver.findElementBy(How.ID, ”addEditEventForm:_IDcancel").submit(); driver.findElementBy(How.ID, ”adminHomeForm:_activityold").submit(); //...
  • 18. Page Objects Page Flows
  • 19. // You can enter your username public LoginPage typeUsername(String username) { // No other method enters a username driver.findElement(usernameLocator).sendKeys(username); return this; } public HomePage loginAs(String username, String password) { typeUsername(username); typePassword(password); return submitLogin(); }
  • 20. Page Objects Page Flows
  • 21. public ResultPage searchFor(String text) { driver.findElement("q") .sendKeys(text) .submit(); return new ResultPage(driver, false); } public SearchPage(WebDriver driver, Boolean doNav) { this.driver = driver; if (doNav) this.driver.get("http://google.com/"); } }
  • 22. public SearchPage() { @FindBy(how = How.NAME, using = "q") private WebElement searchBox; public void searchFor(String text) { searchBox.sendKeys(text).submit(); } public SearchPage(WebDriver driver) { driver.get(Where.SEARCH_PAGE); PageFactory.initElements(driver, this); } }
  • 23. WebElement void clear() void click() WebElement findElement(By by) List findElements(By by) String getAttribute(String name) String getCssValues() Point getLocation() Dimension getSize() String getTagName() String getText(); boolean isEnabled() boolean isSelected() void sendKeys(CharSequence keysToSend) void submit()
  • 24. (show and tell)
  • 25. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>ams-pkg-test</groupId> <artifactId>ams-pkg-test</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>ams-pkg-test</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.35.0</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> </dependencies> </project>
  • 26. Maven plays well with others
  • 27. https://bitbucket.org/nimbleams/open-nu-selenium/
  • 28. Ted Husted Derek Hansen Release Engineer @tedhusted Lead Engineer, @nimblederek
  • 29. All about NimbleUser Nimble AMS is an enterprise Association Management System built by NimbleUser on Force.com. Nimble AMS revolutionizes the traditional AMS model with Chatter, Sites, Apps, Mobile, Social, and more.
  • 30. 2004 - 2006 - 2008 - 2011 - 2014

×