Codeception / Codeception/module-webdriver

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

未关闭
#21 1 条评论 0 个 reaction 已指派 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 摘要。