rubycdp / ferrum

Headless Chrome Ruby API
https://ferrum.rubycdp.com
MIT License
1.71k stars 123 forks source link

Feature: Node#select / Node#selected #191

Closed Mifrill closed 2 years ago

Mifrill commented 3 years ago

Close #58

Mifrill commented 3 years ago

question:


      context "when provided texts of disabled option" do
        before do
          browser.goto("/ferrum/form")
        end

        it "1. clears selected options with no exception" do
          expect(browser.at_xpath("//*[@id='form_title']").select(["Other"]).selected).to eq([])
        end

        it "2. picks disabled option with no exception" do
          expect(browser.at_xpath("//*[@id='form_title']").select(["Other"]).selected).to eq(["Other"])
        end
      end

which is correct 1 or 2?