Screenshot #1

Merged
romanschenk37 merged 10 commits from Screenshot into main 2022-03-15 08:17:22 +01:00
1 changed files with 11 additions and 7 deletions
Showing only changes of commit 34c3023cf9 - Show all commits

18
Main.py
View File

@ -100,14 +100,18 @@ def search_adresses(adress_list, filename_adresslist, driver):
qr.make(fit=True) qr.make(fit=True)
qr.make_image(fill='black', back_color='white').save("qrcodes/" + image_filename) qr.make_image(fill='black', back_color='white').save("qrcodes/" + image_filename)
#Create Screenshot # Create Screenshot
featureElement = driver.find_element(By.XPATH, "//section[@id='one']//div[@class='container']//div[@class='row 150%']") featureElement1 = driver.find_element(By.XPATH,
location = featureElement.location "//section[@id='one']//div[@class='container']//div[@class='row 150%']")
size = featureElement.size featureElement2 = driver.find_element(By.XPATH,
"//section[@id='one']")
location = featureElement1.location
size1 = featureElement1.size
size2 = featureElement2.size
x = location["x"] x = location["x"]
y = 0 # location["y"] y = 5 # location["y"]
w = x + size["width"] w = x + size2["width"]
h = y + size["height"] - 100 h = y + size1["height"]
area = (x, y, w, h) area = (x, y, w, h)
time.sleep(1) time.sleep(1)
driver.save_screenshot("screenshots/" + image_filename) driver.save_screenshot("screenshots/" + image_filename)