File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
e2e-tests/src/main/java/io/kafbat/ui/screens/topics Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 99import io .qameta .allure .Step ;
1010import java .util .ArrayList ;
1111import java .util .List ;
12+ import java .util .NoSuchElementException ;
1213
1314public class TopicSettingsTab extends BasePage {
1415
1516 protected SelenideElement defaultValueColumnHeaderLocator = $x ("//div[text() = 'Default Value']" );
17+ protected SelenideElement nextButton = $x ("//button[contains(text(), 'Next')]" );
18+ protected SelenideElement previousButton = $x ("//button[contains(text(), 'Previous')]" );
1619
1720 @ Step
1821 public TopicSettingsTab waitUntilScreenReady () {
@@ -36,7 +39,23 @@ private TopicSettingsTab.SettingsGridItem getItemByKey(String key) {
3639
3740 @ Step
3841 public String getValueByKey (String key ) {
39- return getItemByKey (key ).getValue ();
42+ while (true ) {
43+ try {
44+ String value = getItemByKey (key ).getValue ();
45+ resetPageNavigation ();
46+ return value ;
47+ } catch (NoSuchElementException ignored ) {
48+ if (nextButton .isEnabled ()) {
49+ nextButton .click ();
50+ }
51+ }
52+ }
53+ }
54+
55+ private void resetPageNavigation () {
56+ while (previousButton .isEnabled ()) {
57+ previousButton .click ();
58+ }
4059 }
4160
4261 public static class SettingsGridItem extends BasePage {
You can’t perform that action at this time.
0 commit comments