-
py.get('#userCode').type('user') Hi I'm using the above code to login to a site. I want the test to wait for the page to fully load before it continues with other steps, I tried to use the title , other elements in the page but it always the same result. what am I missing ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Provide the error that is being raised. The more information you provide, the easier it is to debug and provide guidance. From looking at the provided code, line 3 isn't going to work since Pylenium waits for a lot of things automatically, so you probably don't need to wait for the title of the page and just interact with the element you care about. That's my first bit of advice. But, if you do care about the title, then use a py.should().contain_title('בית') |
Beta Was this translation helpful? Give feedback.
Provide the error that is being raised. The more information you provide, the easier it is to debug and provide guidance.
From looking at the provided code, line 3 isn't going to work since
localName=button
is not valid CSS. It looks like it's commented out, but it's hard to tell since it's not formatted.Pylenium waits for a lot of things automatically, so you probably don't need to wait for the title of the page and just interact with the element you care about. That's my first bit of advice.
But, if you do care about the title, then use a
.should()
expectation which does a wait as well