요소 스크롤 수정

This commit is contained in:
R5600U_PC 2024-10-23 16:18:03 +09:00
parent f4fe20a3c0
commit a3234c8a67
1 changed files with 4 additions and 2 deletions

View File

@ -604,10 +604,12 @@ class PriceHandler:
# 각 선택자를 사용하여 요소 찾기
product_cost_element = await self.page.wait_for_selector(product_cost_locator, timeout=10000)
await self.page.evaluate("arguments[0].scrollIntoView()", product_cost_element)
# await self.page.evaluate("(element) => element.scrollIntoView()", product_cost_element)
await product_cost_element.scroll_into_view_if_needed(timeout=3000)
standard_selling_price_element = await self.page.wait_for_selector(standard_selling_price_locator, timeout=10000)
await self.page.evaluate("arguments[0].scrollIntoView()", standard_selling_price_element)
# await self.page.evaluate("(element) => element.scrollIntoView()", standard_selling_price_element)
await standard_selling_price_element.scroll_into_view_if_needed(timeout=3000)
# cost_value = int(float(await product_cost_element.input_value().replace(",", "")))
cost_value_str = await product_cost_element.input_value()