Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -121,7 +121,9 @@ def run_script(url: str, height: int, width: int, check_b,check_h,wait_time):
|
|
121 |
print(html)
|
122 |
driver.implicitly_wait(int(wait_time*30))
|
123 |
driver.set_window_size(int(width), int(height))
|
124 |
-
|
|
|
|
|
125 |
|
126 |
yield Image.open(f'{uid}-tmp.png'), '<center>Finished loading. If loading is incomplete, restart with longer wait time',out_box,out
|
127 |
|
|
|
121 |
print(html)
|
122 |
driver.implicitly_wait(int(wait_time*30))
|
123 |
driver.set_window_size(int(width), int(height))
|
124 |
+
obj = driver.find_element(By.ID, "component-1")
|
125 |
+
|
126 |
+
screenshot = obj.screenshot(f'{uid}-tmp.png')
|
127 |
|
128 |
yield Image.open(f'{uid}-tmp.png'), '<center>Finished loading. If loading is incomplete, restart with longer wait time',out_box,out
|
129 |
|