我正在尝试将变量添加到 xpath 但无济于事
这适用于 java assertTrue("Failed", verifyElementPresent("//*[@class='StdLJText' and contains(.,'2 Employees selected')]"));
但是当我添加一个变量时,如下所示
字符串 CountEmp1="2"; assertTrue("失败", verifyElementPresent("//*[@class='StdLJText' and contains(.,CountEmp1+'Employees selected')]"));