Omnibus commited on
Commit
8021f6e
1 Parent(s): 43dd3fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- screenshot = driver.screenshot(f'{uid}-tmp.png')
 
 
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