Codeception / Codeception/module-webdriver

`selectOption()` not working with Bootrap's `radio-custom` radiobuttons

オープン
#21 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
PHP
スター
39
フォーク
25
PR マージ指標
30日以内にマージされた PR はありません

説明

I have a [Bootstrap custom radio button](https://getbootstrap.com/docs/4.5/components/forms/#radios):
```html



Whatever

```
When I do this in an acceptance test:
```php
$I->selectOption('input[name="form[foo]"]', 'Whatever:');
```
or
```php
$I->click(['css' => '#form_foo_0']);
```
...I'm getting:
> [Facebook\WebDriver\Exception\ElementClickInterceptedException] element click intercepted:
Element \ is not clickable at point (44, 1171).
Other element would receive the click:
\...\
(Session info: chrome=85.0.4183.83)

The workaround I'm using now is to click the *label:*
```php
$I->click(['css' => 'label[for="form_foo_0"]']);
```
Due to the popularity of Bootstrap I'm wondering if an out-of-the-box solution would be better in this case.

P.S.: I don't know why I have the class `radio-custom` on the `` - it's created by [Symfony's Bootstrap form theme](https://symfony.com/doc/current/form/bootstrap4.html#custom-forms)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。