module-webdriver
module-webdriver copied to clipboard
Inconsistent newline characters for Windows
- Methods
seeInSourceandseeInPageSourcehave different descriptions and run different code paths, but ultimately do the very save comparison. Meaning there should be noseeInPageSourcemethod. Please remove. - I am trying to use either of them, let's say
seeInSource. It works fine in PhpBrowser. But it fails for WebDriver. I have found the solution: I could dostr_replace(chr(13), '', $whatIWantToSeeMultiline)and it will work for WebDriver. This is the old good \n vs \r\n. Could you please compare more intelligently, keeping in mind newline may differ?
Webserver is Apache and it's run on same Windows machine, by the way.
Thanks for this report. Removing methods is complicated because it will break tests for some users.
Some history: WebDriver::seeInPageSource was created in June 2014 and didn't have equivalent in PhpBrowser. In fact, PhpBrowser::see matched page source. Last year a user complained about that and strip_tags was applied to page source. 2 months later someone else wanted to match page source, so seeInSource method was added to PhpBrowser (and to WebDriver for consistency).