0

When I try call feeSchedulePage.create() I'm getting the error AttributeError: 'FeeSchedulePage' object has no attribute 'create'


fee_schedule_page.py

class FeeSchedulePage(Page):

  def enter_name(self, name):

      self.find_element(*FeeScheduleLocators.NAME).send_keys(name)


  def create(self):

      self.enter_name("a")

test_create_fee_schedule.py

class TestCreateFeeSchedule:

  def test_03_CreateFeeSchedule(self):

      feeSchedulePage = FeeSchedulePage(self.driver)
      feeSchedulePage.create()

Any ideia for this?

Rafael C.
  • 2,245
  • 4
  • 29
  • 45
  • 1
    You are mixing tabs and spaces. `def create` uses a tab (as well as spaces), and is indented further than you think (8 spaces, not 4). – Martijn Pieters Nov 11 '16 at 18:54
  • 1
    Don't mix tabs and spaces. Run Python with the `-tt` command-line switch and fix the errors that points out. Convert all tabs to spaces in your editor, and configure your editor to only use spaces when indenting. – Martijn Pieters Nov 11 '16 at 18:55
  • Thanks a lot @MartijnPieters :) Solved my problem. – Rafael C. Nov 11 '16 at 19:12

0 Answers0