Need help with the specific screenshots to take graph screenshots(creating back end by java script) .
I know we can take the element by id, but me getting trouble as new to it.
Tried other way by saving the full screen and cropping it but still getting error with crop function
"TypeError: crop() takes from 1 to 2 positional arguments but 5 were given"
but I can see codes online where four argument can be pass
my codes
enter code here
from selenium import webdriver
from PILLOW import Image
driver = webdriver.Chrome("C:\Selenium_Project\driver\chromedriver")
driver.get('https://python.org')
driver.save_screenshot("screenshot1.png")
im = Image.open('\Selenium_Project\screenshot1.png')
width,height=im.size
left= width/4
top= height/4
right = 3 * width/4
bottom = 3 * height/4
im = im.crop(left, top, right, bottom)
im.save('/Automation_project\Selenium_Project\screenshot1.png')
driver.close()
driver.quit()
If anybody can help witht findelement by id function will also be helpful.
really need help on it guys. cheers