Fix for the wait_selector argument resolving to more than 1 element

This commit is contained in:
Karim shoair
2024-11-22 22:15:52 +02:00
parent 18eb96adb1
commit 869412761a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ class CamoufoxEngine:
if self.wait_selector and type(self.wait_selector) is str:
waiter = page.locator(self.wait_selector)
waiter.wait_for(state=self.wait_selector_state)
waiter.first.wait_for(state=self.wait_selector_state)
content_type = res.headers.get('content-type', '')
# Parse charset from content-type
+1 -1
View File
@@ -214,7 +214,7 @@ class PlaywrightEngine:
if self.wait_selector and type(self.wait_selector) is str:
waiter = page.locator(self.wait_selector)
waiter.wait_for(state=self.wait_selector_state)
waiter.first.wait_for(state=self.wait_selector_state)
content_type = res.headers.get('content-type', '')
# Parse charset from content-type