seeInField with radio buttons

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
testing

Research direction

Start with the WebDriver module's seeInField entry point and the linked seeInField documentation. Review the requested behavior for radio buttons, selects, checkboxes, labels, and null or empty values before defining the scope; no implementation file or test is named in the issue.

Written by the indexing model from the issue text.

Description

Some suggestions/questions for seeInField:

  1. Even if not explicitly mentioned at http://codeception.com/docs/modules/WebDriver#seeInField it works for radio buttons too? And probably select's and checkbox'es too?

  2. For radio buttons, you need to pass the value as second argument:

    $I->seeInField('.gender', 1);
    

    ...which isn't very readable ;-) So I'm suggesting a method to assert a radio button's value by its label - something like:

    $I->seeRadioSelected('.gender', 'female');
    
  3. How can you assert that no radio button is selected? I tried seeInField with null or '' as second argument - both didn't work. So I'm suggesting to include that too.

Dominant language
PHP
Stars
39
Forks
23
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Codeception/module-webdriver

All issues in Codeception/module-webdriver

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.