TT#68016 selenium: better checks for header priority

controller_header.t:
- replace wait_for_text() with find_element_by_xpath() when checking header
rule priority

Change-Id: Ifc866584fe0195c2188bc6665d3c2a8755ea2c82
changes/58/34058/1
Nico Schedel 6 years ago
parent 5c55b1f308
commit 871dcee89e

@ -97,7 +97,7 @@ $d->find_element('//*[@id="save"]')->click();
diag('Check Details');
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), 'Header rule successfully created', "Correct Alert was shown");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[1]', '100'), "Priority is correct");
ok($d->find_element_by_xpath('//*[@id="header_rules_table"]//tr[1]//td[1][contains(text(), "100")]'), "Priority is correct");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[3]', $headerrule), "Name is correct");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[4]', 'this is a nice description'), "Description is correct");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[5]', 'inbound'), "Direction is correct");
@ -118,7 +118,7 @@ $d->find_element('//*[@id="save"]')->click();
diag('Check Details');
is($d->get_text_safe('//*[@id="content"]//div[contains(@class, "alert")]'), 'Header rule successfully updated', "Correct Alert was shown");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[1]', '1'), "Priority is correct");
ok($d->find_element_by_xpath('//*[@id="header_rules_table"]//tr[1]//td[1][contains(text(), "1")]'), "Priority is correct");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[3]', $headerrule), "Name is correct");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[4]', 'this is a very nice description'), "Description is correct");
ok($d->wait_for_text('//*[@id="header_rules_table"]//tr[1]//td[5]', 'outbound'), "Direction is correct");

Loading…
Cancel
Save