Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ruby/COM Testing 2, November 11. Admin Grades for mid-term & hw 2 posted Homeworks 3 & 4 posted Project 2 People doing presentations – stay after class.

Similar presentations


Presentation on theme: "Ruby/COM Testing 2, November 11. Admin Grades for mid-term & hw 2 posted Homeworks 3 & 4 posted Project 2 People doing presentations – stay after class."— Presentation transcript:

1 Ruby/COM Testing 2, November 11

2 Admin Grades for mid-term & hw 2 posted Homeworks 3 & 4 posted Project 2 People doing presentations – stay after class today to plan when

3 What Is COM? Technology for allowing interactions between programs Interface to allow applications to share functionality Component Object Model Technically COM Automation Powerful capability for automated test development!

4 Main Elements Of COM ObjectsMethodsPropertiesEvents

5 Objects Things that can be interacted with Files Files Ranges of Data Ranges of Data Paragraphs Paragraphs“Nouns” Objects can contain other objects and collections (groups of objects)

6 Methods Ways in which objects can be interacted with Save Save Check Spelling Check Spelling Print Print“Verbs”

7 Properties Descriptions of the objects and their state Whether a file is saved Whether a file is saved File name File name Text Formatting Text Formatting“Adjectives”

8 Events Outside things that an object can react to Mouse Click Mouse Click File being saved File being saved Text being entered Text being entered“Triggers”

9 Using COM from Ruby require ‘win32ole’ = WIN32OLE.new( ) = WIN32OLE.new( ) COM identifier = ‘Word.Application’ or ‘InternetExplorer.Application’ Use. or. to access the properties and methods

10 IE Controller Wraps interaction with IE Download from wtr project at rubyforge.org Unzip and run install script Demo

11 Sources of COM Info Office apps: VB Language References at msdn.microsoft.com/library/default.asp VB Language References at msdn.microsoft.com/library/default.aspIE http://msdn.microsoft.com/library/default.asp? url=/workshop/browser/webbrowser/reference /Objects/InternetExplorer.asp http://msdn.microsoft.com/library/default.asp? url=/workshop/browser/webbrowser/reference /Objects/InternetExplorer.asp


Download ppt "Ruby/COM Testing 2, November 11. Admin Grades for mid-term & hw 2 posted Homeworks 3 & 4 posted Project 2 People doing presentations – stay after class."

Similar presentations


Ads by Google