Java Selenium webdriver-无法设置浏览器区域设置
我正在尝试将浏览器区域设置为日语。我使用的代码如下:Java Selenium webdriver-无法设置浏览器区域设置,java,eclipse,selenium,webdriver,Java,Eclipse,Selenium,Webdriver,我正在尝试将浏览器区域设置为日语。我使用的代码如下: FirefoxProfile profile = new FirefoxProfile(); //setting the locale japanese : ‘ja’ profile.setPreference(“intl.accept_languages”,”ja”); driver = new FirefoxDriver(profile); eclipse编辑器上无法识别“intl”。它说“intl”不能解析为局部变量。Eclipse也
FirefoxProfile profile = new FirefoxProfile();
//setting the locale japanese : ‘ja’
profile.setPreference(“intl.accept_languages”,”ja”);
driver = new FirefoxDriver(profile);
eclipse编辑器上无法识别“intl”。它说“intl”不能解析为局部变量。Eclipse也不建议任何导入。它要求我创建一个局部变量“intl”
我不知道还有别的办法。有什么建议吗?我认为你的报价应该是固定的。替换:
profile.setPreference(“intl.accept_languages”,”ja”);
与:
profile.setPreference("intl.accept_languages", "ja");