it is possible to use two python scripts on the same chromedriver browser if the first python script opens the page with chromedriver and the second one python script search on google on the page opened by the chromedriver in the first python script.
I wrote the following code but I don't know how to do what I said above.
First Python Script:
import time
import second_script.py
from selenium import webdriver
driver = webdriver.Chrome("driver87/chromedriver.exe")
driver.get('http://www.google.com/')
time.sleep(5)
execfile('second_script.py')
And the second one should contain:
import time
driver.switch_to.frame(0)
driver.find_element_by_id("introAgreeButton").click()
time.sleep(1)
search_box = driver.find_element_by_name('q')
search_box.send_keys('text searched on google')
search_box.submit()
time.sleep(20)
driver.quit()
I hope someone can help me, and I hope you understand what I want to do. Thanks!