"Will MOM make my bed?
NO, Mum will not make your bed!
But MOM is the Magic Object Model, used to reduce 90% of the Page Object Model
MOM is understanding, forgiving and will do a lot for you by just asking.
MOM Says "Make Your Own Bed!"
The Magic Object Model (MOM) is used to interpret many forms of sentences. It can't make your bed.
MOM has a basic, two to five word sentence structure:
[Verb] [Element Name] [Class] [Verify] [Data]
"Click Send Button"
"Enter Name Field Paul"
"Verify Name Field Contains Paul"
MOM recognizes verbose sentences
"Click on the Send Button"
"Enter Paul into the Name Field"
"Verify the Name Field Contains Paul"
MOM uses deductive reasoning to guess element types in short form sentences
"Click Send"
"Enter Paul into Name"
"Verify Name Contains Paul"
MOM knows a lot of Verbs
Open, Nav, Nav to - any URL
Hover a Button, Link, Tab or Field
Click - a Button, Link, Tab, Field or Radiobutton
Select an item from a List
Enter text into a field
Set or Clear a Checkbox or Radiobutton
Verify
MOM will check your homework
Verify 'Quoted' Text exists
Verify Named Image is displayed
Verify Named Field is 'Expected Text'
Verify Named Field Contains 'Expected Text'
Verify Text does not exist
Verify Named Button is not displayed
MOM is colorful and sensitive
MOM will highlight PASS results in GREEN
Fail results highlight in RED
Non-fatal issues will highlight in PINK
In some cases MOM is sensitive, case sensitive.
Verify 'GET IN TOUCH' Button is displayed may not work.
Tip: Use F12 to review the exact element wording in the HTML page
MOM is looking for your perfect match
If more than one image element matched your text, the other on screen matches will be highlighted for a few seconds and a First Close Match warning will be reported. Consider a using longer string to uniquely identify elements.
Sometimes MOM needs to catch a clue
If MOM does not recognize a sentence with lots of words consider using single quotes.
Click the 'Get in Touch' Button
If no Button elements can be found MOM will class switch to a Link, and give a warning.