Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Selenium webdriver-无法设置浏览器区域设置_Java_Eclipse_Selenium_Webdriver - Fatal编程技术网

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");