mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 15:05:32 +00: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) {
|
public function getRegionObj($region) {
|
||||||
// Try to find regions directly by CSS selector
|
// 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) {
|
if($regionObj) {
|
||||||
return $regionObj;
|
return $regionObj;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user