I need to send a POST request without opening a new tab in chrome and I found such a request, you need to insert it in the address bar:
data:text/html,<form action=http://site. com/ method=post><input name=a>< / form>
But I don't know how to pass these parameters using it.
id: 150
first_name: Alex
last_name: li
phone: 1234567890
email: test@gmail.com
id_2: 6373
buy_type: 1
from selenium import webdriver
from seleniumrequests import Chrome
import requests
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options=options, executable_path=r"C:\chromedriver.exe")
wait = WebDriverWait(driver, 5)
driver.get('http://web-site.com/')
driver.get('data:text/html,<form action=http://web-site.com/ method=post><input name=a></form>')