Open qileilove opened 8 years ago
CasperJS supports XPath, http://docs.casperjs.org/en/latest/selectors.html#selectors which is what PhantomCSS uses to capture screenshots of html components.
@jamescryer thanks,but like the phantomcss.screenshot('#the-dialog', 'a screenshot of my dialog') function, the first parameter must be css selector, can't use xpath selector.
I'm happy to review a Pull Request for the support of XPath
So the only way to take a screenshot is if something is a div class?
Any CSS selector ".my-class"
is the most obvious usage, less obvious might be "[href='http://www.site.com']"
or even "div:first-child span .btn"
but I would recommend keeping your selectors as small as possible, even if that means adding classes you wouldn't have otherwise needed.
If inscribe, troublesome everybody.