Not able to select the Radio button

              <label for="exampleFormControlRadio1">Employment Status: </label>
            <div class="form-check form-check-inline">
              <input class="form-check-input" id="inlineRadio1" name="inlineRadioOptions" type="radio" value="option1">
              <label class="form-check-label" for="inlineRadio1">Student</label>
            </div>
            <div class="form-check form-check-inline">
              <input class="form-check-input" id="inlineRadio2" name="inlineRadioOptions" type="radio" value="option2">
              <label class="form-check-label" for="inlineRadio2">Employed</label>
            </div>
            <div class="form-check form-check-inline">
              <input class="form-check-input" disabled="" id="inlineRadio3" name="inlineRadioOptions" type="radio" value="option3">
              <label class="form-check-label" for="inlineRadio3">Entrepreneur (disabled)</label>
            </div>
          </div>

My script:

    function OP2(Status){
      element.all(by.css("label[class='form-check-label']")).each(function(item2){
        item2.getAttribute('value').then(function(status){
          console.log(status);
if(status === Status) {
  item2.click();
}
        });
      });
    }
    it('Submiting the Form', function () {
        OP2('Employed');   // here my aim is to select the EMPLOYED radio button
        // element.all(by.name('inlineRadioOptions')).get(1).click();
        browser.sleep('5000');
  });

"Null" is displaying in the output and Radio button is not selected.
NO error message is displayed in the output.
Can anyone please help me in solving the issue.

35 thoughts on “Not able to select the Radio button”

  1. We are a group of volunteers and opening a new scheme in our community.
    Your site offered us with valuable information to work on. You’ve done a formidable
    job and our entire community will be grateful to you.

    Reply
  2. Pingback: viagra women
  3. Pingback: sildenafil online
  4. Pingback: price of viagra
  5. Pingback: viagra cost canada
  6. Pingback: walmart cialis
  7. Pingback: furosemide dose
  8. Pingback: xenical 120mg uk
  9. Pingback: priligy medication
  10. Pingback: cialis forms
  11. Pingback: on line cialis

Leave a Comment