Web Front End Automation w/ Selenium · Web Front End Automation w/ Selenium and PowerShell Collin Skiles Programmer Analyst, Willamette University. ... •Create a WebDriver object
Post on 03-Jun-2020
6 Views
Preview:
Transcript
Web Front End Automation w/ Selenium
and PowerShell
Collin SkilesProgrammer Analyst, Willamette University
Session Rules of Etiquette
• Please silence your devices
• If you must leave early, please be discreet
• Please avoid side conversations
– But if you have a germane observation, please share!
• Questions are welcome at any time
Introduction
• What is “front end automation”?
– Why use it?
• What is Selenium?
• Why PowerShell?
• How do I get started?
What is “front end automation”?
• Various meanings– Business
– Software Development
• Our context
• Uses for web front end automation– Regression testing
– Automation of repetitive tasks
• Saves users time on manual tasks
What is Selenium?
• Selenium automates browsers
• Can be used for various purposes
– Testing
– Administration
– Whatever…
• Integrated with many browsers
• Bindings for many languages
Why PowerShell?
• Windows environment was desired
• No additional software needed
• .NET Framework Classes can be used
• No build overhead
How do I get started?
• Download the Selenium C# language bindings
• Download the browser drivers
• Load the .NET language assemblies into your PowerShell session
• Start coding!
Case Study: Colleague UI5
• Migration to HTML5 opens way for browser automation
• Example: Automate creation of PERSON record using NAE and BIO
Case Study: Colleague UI5
• Load libraries
• Create a WebDriver object
• Call object methods to interact with the browser
• Demo Time!
Brief Overview of WebDriver Methods
• Navigate()
– GoToUrl(String)
– Back()
• FindElementById(String)
– SendKeys(String)
– Click()
• FindElementByXPath(String)
More Features
• Get tag attributes and text
• Switching between frames
• Interacting with complex page objects– Drag and Drop
– Multiple Select
• Clicking on specific page coordinates
• Executing JavaScript snippets– Can be used to scroll down a page manually
Actual Business Use
• ACES2 Document Download– Law School CRM
– Required by Bar Association
• Technolutions Slate Integration
• Download documents from ACES2
• Upload Documents to Slate
• Problem: ACES2 only accessible via web interface
Actual Business Use
Actual Business Use
Actual Business Use
Actual Business Use
• Solution: Use automation to download file
• Difficulties
– ACES2 markup and erratic website behavior
– Downloading a file
• Successes
– One PowerShell script can handle process from start to end
Conclusion
• Powerful tools for automating workflows
– (Relatively) Easy to implement
– Well documented
– Free!
• Questions?
Thank you for coming!
Link to example code
Collin Skiles
Programmer Analyst, Willamette University
cskiles@willamette.edu
top related