I'm just trying to make a script that plays with the website kijiji (login, post ads). I did a search but can't seem to find a solution to this. One other thread said to use chrome options and a module called fake useragent but I am still getting a blank screen after clicking the sign in button. Kijiji.ca itself loads up fine but not when signing in. I don't understand why this is happening.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from fake_useragent import UserAgent
from time import sleep
PATH = executable_path=r"...path to chromedriver.exe..."
options = Options()
ua = UserAgent()
userAgent = ua.random
print(userAgent)
options.add_argument(f'user-agent={userAgent}')
browser = webdriver.Chrome(PATH,options=options)
def login():
browser.get("https://kijiji.ca")
sleep(2)
browser.find_element_by_link_text('Sign In').click()
sleep(2)
login()