-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Indexed property child field is not being added correctly #306
Comments
I've run into this problem as well. Essentially, page-object does a check to make sure you are not overwriting an instance method on class Class before defining the property method, since Class already has an instance method :name, it doesn't define the property. Unfortunately this fails silently rather than warning the user. I'm not sure it's a good idea to allow a property called :name to be declared, but there should probably be a warning of some sort rather than silently doing nothing. |
That was my first instinct as well but if this is the case then calling .name on the object in question shouldn't throw a No Method error right? name is also not present when I print the methods for the object in question. |
Example test case is below. HTML:
Page-object code:
|
I have defined an index property in my page-object. All of these fields are working except the :name field. I renamed it to :physician_name which worked but the method isn't created when it is :name.
indexed_property(:physician_panel,[
[:p, :physician_tab, text: '%s Physician'],
[:td, :name, id: 'authSubmitView-physicianPanel-%sPhysicianTab-NameField'],
[:td, :npi, id: 'authSubmitView-physicianPanel-%sPhysicianTab-NPIField'],
[:td, :specialty, id: 'authSubmitView-physicianPanel-%sPhysicianTab-SpecialtyField'],
[:td, :address, id: 'authSubmitView-physicianPanel-%sPhysicianTab-AddressField'],
[:td, :tin, id: 'authSubmitView-physicianPanel-%sPhysicianTab-TINField'],
[:td, :group_name, id: 'authSubmitView-physicianPanel-%sPhysicianTab-GroupNameField'],
[:td, :city_state_zip, id: 'authSubmitView-physicianPanel-%sPhysicianTab-CityStateZipField'],
[:text_field, :contact_name, id: 'authSubmitView-physicianPanel-%sPhysicianTab-ContactNameField'],
[:text_field, :email, id: 'authSubmitView-physicianPanel-%sPhysicianTab-EmailField'],
[:text_field, :phone_number, id: 'authSubmitView-physicianPanel-%sPhysicianTab-PhoneField'],
[:text_field, :last_contact, id: 'authSubmitView-physicianPanel-%sPhysicianTab-LastContactField'],
[:text_field, :fax_number, id: 'authSubmitView-physicianPanel-%sPhysicianTab-FaxField']
])
The text was updated successfully, but these errors were encountered: