diff --git a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php index 24ba989..097a177 100644 --- a/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php +++ b/core/modules/contact/lib/Drupal/contact/Tests/ContactSitewideTest.php @@ -221,15 +221,7 @@ function testSiteWideContact() { $this->drupalGet('admin/structure/contact'); // Find out in which row the category we want to add a field to is. - $i = 0; - foreach($this->xpath('//table/tbody/tr') as $row) { - if (((string)$row->td[0]) == $label) { - break; - } - $i++; - } - - $this->clickLink(t('Manage fields'), $i); + $this->drupalGet('admin/structure/contact/manage/' . $category . '/fields'); $this->assertResponse(200); // Create a simple textfield.