To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorIndividual
- Scenarios
-
- Multiple data attributes
- Additional inline data attributes
- Empty HTML fragment
- Element fragment with no data attributes
- Multiple data attributes
-
Any 'valueless' data attribute will be used as the key for the data in the return set
- Given
-
the following HTML fragment:
<span data-opening-time class="foo">9am</span> <span data-closing-time class="bar">6pm</span>
- Then
-
the page object data should be:
{ opening_time: '9am', closing_time: '6pm' }
- Additional inline data attributes
-
Sometimes it can be useful to attach additional data attributes to a tag.
- Given
-
the following HTML fragment:
<span data-product-name data-sku="12345">6pm</span>
- Then
-
the page object data should be:
{product_name: '6pm', sku: '12345'}
- Empty HTML fragment
-
- Given
- an empty HTML fragment
- Then
-
the page object data should be:
{}
- Element fragment with no data attributes
-
Any context not annotated with data attributes will be ignored.
- Given
-
the following HTML fragment:
<ul> <li>Car</span> <li>Boat</span> </ul>
- Then
-
the page object data should be:
{}
Last published over 7 years ago by andy8.