Hey guys
I'm currently writing a bot for my typing-learning website, but i bumped into a problem that my own googling couldn't solve:
if answerBrowser == "f":
driver = webdriver.Firefox()
elif answerBrowser == "c":
driver = webdriver.Chrome("driver\chromedriver.exe")
elif answerBrowser == "e":
driver = webdriver.Edge("driver\msedgedriver.exe")
driver.get("https://at4.typewriter.at/index.php?r=site/index")
Here I made a "driver" object and then opened it with driver.get(link), however, after i am done doing my stuff on the website, I want to just open another link (in the same tab ofc.). I tried:
driver.get("https://at4.typewriter.at/index.php?r=user/overview")
(I am trying this because the link to the overview page is really hard to scrape and I think it's easier to just change the url completly) Its the same "driver"-object, but just driver.get() wont let me change the url.
Here's the git repos for the entire code:
https://github.com/patrickcerny/typewriterBot/tree/testing
(I'm a beginner in coding so please don't hate on my code too much, however I'm open for any constructive critism I can get! :D) Thanks for any answers!
if answerBrowser == "f": driver = webdriver.Firefox() ....so many times ? You should use it only once and later use only thisdriverall time. You should create special function only to select and create driver.