python – How to click on an element with Selenium without using Driver.get?

so i think you don’t understand driver.get() usage. it is used only to make the browser browse to a specific link which you can specify before hand. what you have to do here is open the google meet page manually and go to your required page where you want to click the button. right click on the button and click on inspect. then go to the higlighted code and locate the button you want and right click on copy and select xpath from the list. now coming to your code.

add this line:


replace _xpath with the long string you copied (which is the xpath of the button you want to click).
this is the way to click on buttons or text boxes or anything you name it in selenium.

**beware of one thing. don’t make your code click immediately. if the page does not fully load and the click is made then the 1st line will throw an element not found error. put some kind of delay till page loads or use a while loop and exception handling to wait till the element is found

Read more here: Source link