Skip to content

Commit 88a3a5b

Browse files
authored
Hot fixed (#121)
Co-authored-by: DESKTOP\atthaboon.s <[email protected]>
1 parent 0d9dadb commit 88a3a5b

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

PuppeteerLibrary/playwright/custom_elements/playwright_page.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,16 @@ async def waitForSelector_with_selenium_locator(self, selenium_locator: str, tim
7878
options['state'] = 'hidden'
7979

8080
selector_value = SelectorAbstraction.get_selector(selenium_locator)
81-
return await self.get_page().wait_for_selector(
82-
selector=selector_value,
83-
timeout=options['timeout'],
84-
state=options['state'])
81+
if self.selected_iframe is not None:
82+
return await self.selected_iframe.wait_for_selector(
83+
selector=selector_value,
84+
timeout=options['timeout'],
85+
state=options['state'])
86+
else:
87+
return await self.get_page().wait_for_selector(
88+
selector=selector_value,
89+
timeout=options['timeout'],
90+
state=options['state'])
8591

8692
############
8793
# Query

0 commit comments

Comments
 (0)