mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
handle single quote in getRegionObj()
This commit is contained in:
parent
10da00c796
commit
15d1f56e06
@ -137,7 +137,9 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
|
||||
*/
|
||||
public function getRegionObj($region) {
|
||||
// Try to find regions directly by CSS selector
|
||||
$regionObj = $this->getSession()->getPage()->find('css', $region);
|
||||
//handle data-title with single quote
|
||||
$locator = str_replace("'", "\'", $region);
|
||||
$regionObj = $this->getSession()->getPage()->find('css', $locator);
|
||||
if($regionObj) {
|
||||
return $regionObj;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user