I'm using Chrome browser, how I can send a post request with selenium?
I found this answer Is there any way to start with a POST request using Selenium?, but the suggested solution is a little bit outdated (last update in 2016) The outdated library https://pypi.org/project/selenium-requests/
My code:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
driver = webdriver.Chrome(executable_path=driver_path, options=options)
response = driver.request('POST', url, data={"key_1": 'value_1', 'key_2': 'value_2'})
# AttributeError: 'WebDriver' object has no attribute 'request'
P.S. I was surprised when not found already existing answer.