need to capture the error message via playwright

This commit is contained in:
2022-03-21 17:27:35 +01:00
parent a5b172d4d6
commit 0fada84551
+3 -3
View File
@@ -88,7 +88,7 @@ class CommandorPage:
document.getElementById("name").value = name.firstName}""", {'lastName': lastName, 'firstName': firstName}) document.getElementById("name").value = name.firstName}""", {'lastName': lastName, 'firstName': firstName})
def getErrors(self): def getErrors(self):
items = self.page.query_selector(".alert") items = self.page.query_selector("div.alert")
if items: if items:
print(items.inner_html()) print(items.inner_html())
@@ -128,8 +128,8 @@ def launch_page() -> threading.Event:
"username": "panleicim-cc-fr-sid-179112", "username": "panleicim-cc-fr-sid-179112",
"password": "M3PZAXgW5V27" "password": "M3PZAXgW5V27"
} }
contact = ContactPojo(phone_number="+33751177505", passport_number="9933251119", last_name="Chen", first_name="Fan", contact = ContactPojo(phone_number="+33758321759", passport_number="9533251119", last_name="Cheng", first_name="Fan",
mail="lei_chena09@outlook.com", ccid="", position=0) mail="checn.fan@outlook.com", ccid="", position=0)
page = CommandorPage() page = CommandorPage()
return page.start_page(proxy, contact) return page.start_page(proxy, contact)