Actions

Testing Area/Behat Testing/Selectors and Elements: Difference between revisions

From Mahara Wiki

< Testing Area‎ | Behat Testing
mNo edit summary
mNo edit summary
Line 1: Line 1:
Element and Selectors are to be used in unisen. An Element is the title of the selector you are using. Ie, If you need to press a button. The button is the selector and then Element is the name of the button.
Element and Selectors are to be used in unisen. An Element is the title of the selector you are using. Ie, If you need to press a button. The button is the selector and then Element is the name of the button.


Line 14: Line 13:
==Elements==
==Elements==


Element and Selectors are to be used in unisen.
Element are the title of the selector. 
That hard one is: "css_elemet"
 
For this you need to right click->Inspect Element and then find the class or Id. Class is recogised by a fullstop and ID is recgonised by a #.
 


==Selectors==
==Selectors==

Revision as of 16:42, 10 November 2014

Element and Selectors are to be used in unisen. An Element is the title of the selector you are using. Ie, If you need to press a button. The button is the selector and then Element is the name of the button.

As an example:

And "$elements" "$selector" should be visible

Would be written as:

And "Create page" "button" should be visible


Elements

Element are the title of the selector. That hard one is: "css_elemet"

For this you need to right click->Inspect Element and then find the class or Id. Class is recogised by a fullstop and ID is recgonised by a #.


Selectors

Where ever it says "Selector" any of these forms of selectors can be used:

  • dialogue
  • block
  • region
  • table_row
  • link
  • button
  • link_or_button
  • select
  • checkbox
  • radio
  • file
  • filemanager
  • optgroup
  • option
  • table
  • field
  • fieldset
  • text
  • css_element
  • xpath_element


FAQ'S