在编译代码时,我遇到了问题,在某些条件下,我试图创建一个类抛出个性化异常的方法。但在编写时,我收到了这样的信息:
public NoSuchElementException(String message){ }}public int getId(....) throws NoSuchElementException {
if (condition is met) {/
@Then ("^I hover on (.+) menu and (.+) submenu$") Actions actions = new Actions(webdriver);
WebElement menuHoverLink = webdriver.findElement(By.xpath("//a[text() = '