panther
panther copied to clipboard
Panther Crawler needs rework
Hi,
A list of non-exhaustive things.
- Some method are not typed (ex missing @return WebDriverElement[] on findElements method, filter() should take a string... etc)
selectFromXpathandfilterXPathdoes the same thing.- I don't understand the visibility of methods : ̀getElement' is public while
getElementOrThrowis private. - It's hard to understand why some methods return a Crawler (that implements WebDriverElement) and why some others methods return a WebDriverElement ..
- You can use WebDriverBy object with getElements method while you can only use an xpath or cssSelector with filter / filterXPath methods..
- selectXXX methods must be commented and xpath are too restricive for real usage.
- All methods from
WebTestAssertionsTraitorClienttake string locator in contrary of Panther Crawler. This string is used to determine the WebDriverBy used with poor logic.
- Rename the entire class to
PantherCrawlerto avoid confusion with Symfony's DomCrawler. Internally, you're using this alias anyway :-)use Symfony\Component\Panther\DomCrawler\Crawler as PantherCrawler;