title: TypeError: readData() missing 1 required positional argument: 'data'
body: <p>facing an code error. iam in learning phase of python, 
  trying to do a DDT framework for Python with selenium.</p>
  
  <pre><code>userN = getData.readData(path,'Sheet1',r,1) TypeError: readData() missing 1 required positional argument: 'data'
  </code></pre>
  
  <p>Below code for XLutil.py</p>
  
  <pre><code>import openpyxl
  
  class getData():
  
  
  def getRowCount(file,sheetName):
      workbook = openpyxl.load_workbook(file)
      sheet = workbook.get_sheet_by_name(sheetName)
      return (sheet.max_row)
  
  def getColumnCount(file,sheetName):
      workbook = openpyxl.load_workbook(file)
      sheet = workbook.get_sheet_by_name(sheetName)
      return (sheet.max_column)
  
  def readData(file,sheetName,rownum,columnno):
      workbook = openpyxl.load_workbook(file)
      sheet = workbook.get_sheet_by_name(sheetName)
      return sheet.cell(row=rownum,column=columnno).value
  
  def writeData(file,sheetName,rownum,columnno,data):
      workbook = openpyxl.load_workbook(file)
      sheet = workbook.get_sheet_by_name(sheetName)
      sheet.cell(row=rownum,column=columnno).value = data
      workbook.save(file)
  </code></pre>
  
  <p>Below code for login.py</p>
  
  <pre><code>        path = 'c:/Users/mahmood/PycharmProjects/Selenium_automaton/Login.xlsx'
      # global path
      driver = self.driver
      row = getData.getRowCount(path,'Sheet1')
      for r in range(2,row+1):
        driver.get("https://xxx-eee.xyxxxve.com/")
        userN = getData.readData(path,'Sheet1',r,1)
        passW = getData.readData(path,'Sheet1',r,2)
  
        login = LoginPage(driver)
        login.enter_username(userN)
        login.enter_password(passW)
        login.click_login()
  
        homepage = HomePage(driver)
        homepage.click_welcome()
        homepage.click_logout()
  </code></pre>
  
  <p>I am trying to fetch data from the Excel sheet username and password through openpyxl getting below error.</p>
  
  <pre><code>Testing started at 6:47 AM ...
  C:\Users\mahmood\PycharmProjects\Selenium_automaton\venv\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2019.2.3\helpers\pycharm\_jb_unittest_runner.py" --target login.LoginTest
  Launching unittests with arguments python -m unittest login.LoginTest in C:\Users\mahmood\PycharmProjects\Selenium\SampleProjects\POMProjectDemo\Tests
  
  C:\Users\mahmood\PycharmProjects\Selenium\SampleProjects\POMProjectDemo\Utility\XLUtil.py:8: DeprecationWarning: Call to deprecated function get_sheet_by_name (Use wb[sheetname]).
    sheet = workbook.get_sheet_by_name(sheetName)
  
  Error
  Traceback (most recent call last):
    File "C:\Users\mahmood\AppData\Local\Programs\Python\Python37-32\lib\unittest\case.py", line 59, in testPartExecutor
      yield
    File "C:\Users\mahmood\AppData\Local\Programs\Python\Python37-32\lib\unittest\case.py", line 628, in run
      testMethod()
    File 
  
  &gt; "C:\Users\mahmood\PycharmProjects\Selenium\SampleProjects\POMProjectDemo\Tests\login.py",
  &gt; line 26, in test_login_valid
  &gt;     userN = getData.readData(path,'Sheet1',r,1) TypeError: readData() missing 1 required positional argument: 'data'
  
  
  Assertion failed
  
  
  Ran 1 test in 6.994s
  
  FAILED (errors=1)
  text Completed
  </code></pre>