Geb给出org.openqa.selenium.InvalidSelectorException:

Geb给出org.openqa.selenium.InvalidSelectorException:,selenium,cucumber,appium,geb,pageobjects,Selenium,Cucumber,Appium,Geb,Pageobjects,我已经将geb核心更新为编译“org.gebish:geb核心:0.10.0”,从那时起,我得到以下错误信息 org.openqa.selenium.InvalidSelectorException: Locator Strategy 'css selector' is not supported for this session (WARNING: The server did not provide any stacktrace information) 代码 static conten

我已经将geb核心更新为编译“org.gebish:geb核心:0.10.0”,从那时起,我得到以下错误信息

org.openqa.selenium.InvalidSelectorException: 
Locator Strategy 'css selector' is not supported for this session (WARNING: The server did not provide any stacktrace information)
代码

static content = {
        welcomeMessage {$("welcome_message")} // here occurs error org.openqa.selenium.InvalidSelectorException:  
    }
“$(“欢迎信息”)是我没有找到的元素,但它显示在屏幕上。我遵循了geb语法,它看起来是一样的

我尝试了以下语法,但仍然不起作用

  • 欢迎留言{$(“.欢迎留言”)}
  • 欢迎留言{$(“欢迎留言”)}
  • 欢迎留言{$(“#欢迎留言”)}
  • 欢迎留言{$(“--#欢迎留言”)}

  • 尝试更改选择器方法!那么使用当前版本1.1.1而不是非常旧的版本如何?我认为在使用类选择器时,每个类都必须在前面加上“.”,因此您的示例应该是$(“.welcome_message”)对吗?@Emna我没有得到“尝试更改选择器方法!”@kriegaex我尝试了更新,但它不工作尝试更改选择器方法!那么使用当前版本1.1.1而不是非常旧的版本如何?我认为在使用类选择器时,每个类都必须在前面加上“.”,因此您的示例应该是$(“.welcome_message”),对吗?@Emna我没有得到“尝试更改选择器方法!”@kriegaex我尝试了更新,但它不起作用