[Selenium and Python]Problem with the auxiliary class when running the test

  • 0 Replies
  • 600 Views
I have a problem with the helper class when running the test. As it is only in the Contakt class:

Code
class Contact:
    def __init__(self, firstname, middlename, lastname, nickname):
        self.firstname = firstname
        self.middlename = middlename
        self.lastname = lastname
        self.nickname = nickname

it's all ok and the test works. And how will I do it:

Code
class Contact:
    def __init__(self, firstname, middlename, lastname, nickname, title_photo, email, email2, email3):
        self.firstname = firstname
        self.middlename = middlename
        self.lastname = lastname
        self.nickname = nickname
        self.title_photo = title_photo
        self.email = email
        self.email2 = email2
        self.email3 = email3

this test does not work in the console pops up such a message:

https://imgur.com/1qXvDiz


I have added parameters for testing:

Code
def test_add_contact_in_book_address(self):
        wd = self.wd
        self.open_home_page(wd)
        self.login(wd, username="admin", password="secret")
        self.user_data(wd, Contact(firstname="Lukasz", middlename="Ebi", lastname="Blaszkowski", nickname="lblaszkowski"))
        self.adding_a_picture_and_name(wd, Contact(title_photo="Chomik"))
        self.e_mail_data(wd, Contact(email="[email protected]", email2="[email protected]", email3="[email protected]"))

I want to give all parameters from the helper class, but I do not know how to do it.


 

Sitemap 1 2 3 4 5 6 7 8