diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb6b04d..d833ab6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,11 +8,11 @@ jobs: strategy: matrix: - php: [8.0, 8.1, 8.2, 8.3] + php: [8.1, 8.2, 8.3, 8.4] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 diff --git a/composer.json b/composer.json index 56858d0..6e419f1 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ ], "homepage": "https://codeception.com/", "require": { - "php": "^8.0", + "php": "^8.1", "ext-mbstring": "*", "guzzlehttp/psr7": "^2.0", "phpunit/phpunit": "^9.5 | ^10.0 | ^11.0", diff --git a/src/Util/Locator.php b/src/Util/Locator.php index 1ca8dac..7e32e25 100644 --- a/src/Util/Locator.php +++ b/src/Util/Locator.php @@ -338,11 +338,9 @@ public static function humanReadableString(WebDriverBy|array|string $selector): $locator = $selector[$type]; return "{$type} '{$locator}'"; } - if (class_exists('\Facebook\WebDriver\WebDriverBy') && $selector instanceof WebDriverBy) { - $type = $selector->getMechanism(); - $locator = $selector->getValue(); - return "{$type} '{$locator}'"; - } - throw new InvalidArgumentException("Unrecognized selector"); + + $type = $selector->getMechanism(); + $locator = $selector->getValue(); + return "{$type} '{$locator}'"; } }