cheezy / page-object

Gem to implement PageObject pattern in watir-webdriver and selenium-webdriver
MIT License
653 stars 220 forks source link

page_populator does not work when element name match element type(text) #447

Open vveliev opened 7 years ago

vveliev commented 7 years ago

So I run in to the problem, maybe naming is bad, but it's not the point. page.rb

text_field(:text, css: 'section > form > div > div.input-fields > div:nth-child(2) > div > input[type="text"]')

when I try to populate page:

populate_page_with(text: 'text')

->

*** ArgumentError Exception: wrong number of arguments (given 0, expected 1)

problem in:

    def is_radiobutton?(key)
      respond_to?("select_#{key}".to_sym)
    end

as select_text - exist in watir

vveliev commented 7 years ago

Maybe it's time to change all validators to :

self.send("#{key}_element").element.class

as they all watir elements

vveliev commented 7 years ago

fix in #448

cheezy commented 7 years ago

@vveliev Let's work on this issue during the Hackathon.