Hi I'm tryna access a site and get all the images and replace it with my own. So in this case change the images on google.com . I've come this far but the google image is not changing but i can see it changed when I inspect the element. What do I have to do to see the change reflected?
from selenium.webdriver.chrome.service import Service
from selenium import webdriver
from selenium.webdriver.common.by import By
s = Service(chrome)
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])
driver = webdriver.Chrome(service=s, options=options)
driver.get("https:/www.google.com/")
element = driver.find_element(By.TAG_NAME, "img")
driver.execute_script("arguments[0].setAttribute('src', 'C:/img/change.png');", element);