Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97778

How to replace a button text with customized text using Selenium Python (MacOS)?

$
0
0

I want to basically do a temporary edit to a webpage (like how people do it using inspect element) but have it done automatically using selenium. For example this is an image from google.ca :

https://imgur.com/nAVquUF

I simply want to change the text of "Gmail" and "Images" into whatever I want.

I only have this so far:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

browser = webdriver.Chrome('/Users/--------/Downloads/chromedriver')
browser.get("https://google.ca/")
x = browser.find_element_by_id('Gmail')

Is there a way I can do this?


Viewing all articles
Browse latest Browse all 97778

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>