In need help to resolve the "TypeError: getattr(): attribute name must be string" error #2363
SergeyGuschin
started this conversation in
General
Replies: 2 comments 4 replies
-
Looks like you're calling the object method incorrectly. Do this instead: from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class SignupPage():
def click_cookie_button(self, sb):
sb.click(".cookies-eu-ok.js-cookies-eu-ok")
class TestPom(BaseCase):
def test_pom(self):
self.open("https://ivoryegg.co.uk/")
SignupPage().click_cookie_button(self)
self.sleep(2) For details, see Syntax Format number 5. |
Beta Was this translation helpful? Give feedback.
3 replies
-
Michael, by any chance, do you know why I don't have method suggestions when using sb instead self in Pycharm? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I don't understand why I get the "TypeError: getattr(): attribute name must be string" error. I am trying to use POM and split pages from tests.
Here is my cs_page.py code
Here is my test_pom.py
When I run the pytest test_pom.py I have this error.
Beta Was this translation helpful? Give feedback.
All reactions