Open KimberlyMunoz opened 9 years ago
Apparently BeautifulSoup, which Macro Polo is using to parse the resulting HTML, treats multiple classes as a list.
>>> from bs4 import BeautifulSoup
>>> soup = BeautifulSoup("<p class='bar feh omg'></p>")
>>> soup.select('p')
[<p class="bar feh omg"></p>]
>>> soup.select('p')[0].get('class')
['bar', 'feh', 'omg']
This means your specification will have to do that as well, I think.
{
"selector": "p",
"value": ["bar", "feh", "omg"],
"assertion": "equal",
"attribute": "class"
}
I'll try to find a way to make that a bit less awkward.
So there's syntax for checking the class of selector. It's nifty and works like this:
But if there's multiple classes, I can't figure out how to test. If I only do one like this, it'll fail.
If I check for all the classes, it'll fail.
Can we add some way to test for things with multiple classes?