![](/img/trans.png)
[英]Appium Error :Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session
[英]Exception in thread “main” org.openqa.selenium.SessionNotCreatedException: Failed to start browser
我在2台計算機上使用相同的代碼和版本,但是另一個無法啟動Firefox。 請幫我
線程“主要” org.openqa.selenium.SessionNotCreatedException中的異常:無法啟動瀏覽器C:\\ Program Files \\ Mozilla Firefox \\ firefox.exe:權限被拒絕(警告:服務器未提供任何堆棧跟蹤信息)
命令持續時間或超時:0毫秒
構建信息:版本:'3.3.1',修訂版:'5234b32',時間:'2017-03-10 09:04:52 -0800'
系統信息:主機:'XUANTRUONG-PC',ip:'192.168.1.95',操作系統名稱:'Windows 10',os.arch:'amd64',os.version:'10 .0',java.version:'1.8 .0_121'
驅動程序信息:driver.version:FirefoxDriver
要使用Selenium 3.4.0,您需要從此處強制下載gecko驅動程序v0.16.0(或更高版本)並將其保存在您的計算機中。 將Mozila Firefox升級到最新的穩定版本(v 53.x)。 在System.setProperty
,在代碼中使用geckodriver的絕對路徑
在您的代碼中:
替換System.setProperty("webdriver.firefox.marionette","C:\\\\geckodriver.exe");
使用System.setProperty("webdriver.gecko.driver","C:\\\\your_directory\\\\geckodriver.exe");
讓我知道這是否對您有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.