|
@@ -16,6 +16,21 @@ def brower_start(port):
|
|
|
return browser
|
|
|
|
|
|
|
|
|
+def brower_start2(port):
|
|
|
+ option = webdriver.ChromeOptions()
|
|
|
+ option.add_argument('--disable-web-security')
|
|
|
+ option.add_argument('--allow-running-insecure-content')
|
|
|
+
|
|
|
+ driver = webdriver.Chrome(options=option)
|
|
|
+
|
|
|
+ executor_url = driver.command_executor._url
|
|
|
+ session_id = driver.session_id
|
|
|
+ print (session_id)
|
|
|
+ print (executor_url)
|
|
|
+ time.sleep(3)
|
|
|
+
|
|
|
+ return driver
|
|
|
+
|
|
|
def serive_create():
|
|
|
option = webdriver.ChromeOptions()
|
|
|
|
|
@@ -24,7 +39,7 @@ def serive_create():
|
|
|
# option.add_argument("--user-data-dir=//Users//noodles//Documents//project")
|
|
|
# option.add_argument("profile-directory="+profilepath)
|
|
|
|
|
|
- driver = webdriver.Chrome('../../driver/chromedriver_20230202/chromedriver', options=option)
|
|
|
+ driver = webdriver.Chrome('../../driver/chromedriver_win32/chromedriver', options=option)
|
|
|
executor_url = driver.command_executor._url
|
|
|
session_id = driver.session_id
|
|
|
print (session_id)
|