我无法提取正确的 xpath ,可以帮助我

I am unable to extract the correct xpath , can help me

对于 xpath 请帮我获取 xpath

尝试 //a[@class='registrationBtn']/span[1]

处理动态元素引入 WebDriverWait 并等待元素 elementToBeClickable 然后点击。

试试下面的代码。

WebDriverWait wait = new WebDriverWait(driver, 30);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//div[@class='fr mt-header']/a[@class='registrationBtn' and @title='Client-Patient Registration']")));
element.click()

WebDriverWait wait = new WebDriverWait(driver, 30);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//div[@class='fr mt-header']/a[@class='registrationBtn' and @title='Client-Patient Registration']/span[@class='reg_icon']")));
element.click()