Your Name 4 年之前
父節點
當前提交
c42aa672c7
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 1
      tests/seltest.py
  2. 1 0
      web/browser_common.py

+ 1 - 1
tests/seltest.py

@@ -3,7 +3,7 @@ sys.path.insert(0,'./kw_tools/web')
 import browser_common
 jb=browser_common.JBrowser()
 #jb.set_profile_path('/home/jared/.config/google-chrome/Default/')
-jb.set_profile_path('"/home/jared/.config/google-chrome/Profile 2/"')
+jb.set_profile_path('"/home/jared/.config/google-chrome/"')
 
 jb.get('http://www.yahoo.com.tw')
 

+ 1 - 0
web/browser_common.py

@@ -25,6 +25,7 @@ class JBrowser:
             option.add_argument("--user-data-dir='C:\\Users\\jared\\AppData\\Local\\Google\\Chrome\\User Data\\"+self.profilepath+"\\'")
         else:
             option.add_argument("--user-data-dir="+self.profilepath)
+            option.add_argument('--profile-directory="Profile 1"')
 
         self.option=option
         driver = webdriver.Chrome(options=option)