Quel serait l'équivalent Webdriver pour assertconfirmation? je code suivant IDE de sélénium qui, lorsqu'elle est exportée vers JUnit 4 (WebDriver) renvoie une erreur:Quel serait l'équivalent de webdriver pour assertconfirmation?
code IDE:
<tr>
<td>click</td>
<td>link=Logout</td>
<td></td>
</tr>
<tr>
<td>assertConfirmation</td>
<td>Are you sure you want to logout?</td>
<td></td>
</tr>
exporté Code WebDriver qui correspond à ci-dessus:
@Test
public void testUntitled2() throws Exception {
driver.findElement(By.linkText("Logout")).click();
// ERROR: Caught exception [ERROR: Unsupported command [getConfirmation]]
}
I utiliser pour être en mesure d'utiliser avec succès ce qui suit avec RC mais avec webdriver il ne fonctionne plus - (s'il vous plaît noter que j'essaie de migrer mes scripts à webdriver)
assertTrue(selenium.getConfirmation().matches("^Are you sure you want to logout[\\s\\S]$"));
Vive
Shan
Cela a parfaitement fonctionné - Merci – user929258