|
35 | 35 | import static org.openqa.selenium.testing.TestUtilities.isIe7;
|
36 | 36 |
|
37 | 37 | import org.junit.Test;
|
| 38 | +import org.openqa.selenium.environment.webserver.Page; |
38 | 39 | import org.openqa.selenium.testing.Ignore;
|
39 | 40 | import org.openqa.selenium.testing.JUnit4TestBase;
|
40 | 41 | import org.openqa.selenium.testing.JavascriptEnabled;
|
@@ -322,6 +323,32 @@ public void testCanClickOnAnExternalImplicitSubmitButton() {
|
322 | 323 | checkSubmitButton("external_implicit_submit");
|
323 | 324 | }
|
324 | 325 |
|
| 326 | + @Test |
| 327 | + @Ignore(value = MARIONETTE, issue = "3398") |
| 328 | + public void canSubmitFormWithSubmitButtonIdEqualToSubmit() { |
| 329 | + String blank = appServer.create(new Page().withTitle("Submitted Successfully!")); |
| 330 | + driver.get(appServer.create(new Page().withBody( |
| 331 | + String.format("<form action='%s'>", blank), |
| 332 | + " <input type='submit' id='submit' value='Submit'>", |
| 333 | + "</form>"))); |
| 334 | + |
| 335 | + driver.findElement(By.id("submit")).submit(); |
| 336 | + wait.until(titleIs("Submitted Successfully!")); |
| 337 | + } |
| 338 | + |
| 339 | + @Test |
| 340 | + @Ignore(value = MARIONETTE, issue = "3398") |
| 341 | + public void canSubmitFormWithSubmitButtonNameEqualToSubmit() { |
| 342 | + String blank = appServer.create(new Page().withTitle("Submitted Successfully!")); |
| 343 | + driver.get(appServer.create(new Page().withBody( |
| 344 | + String.format("<form action='%s'>", blank), |
| 345 | + " <input type='submit' name='submit' value='Submit'>", |
| 346 | + "</form>"))); |
| 347 | + |
| 348 | + driver.findElement(By.name("submit")).submit(); |
| 349 | + wait.until(titleIs("Submitted Successfully!")); |
| 350 | + } |
| 351 | + |
325 | 352 | private void checkSubmitButton(String buttonId) {
|
326 | 353 | driver.get(appServer.whereIs("click_tests/html5_submit_buttons.html"));
|
327 | 354 | String name = "Gromit";
|
|
0 commit comments