@@ -60,7 +60,17 @@ class Form extends Block
6060 */
6161 public function getGroup ($ tabName , $ groupName )
6262 {
63- $ this ->openTab ($ tabName );
63+ $ this ->baseUrl = $ this ->getBrowserUrl ();
64+ if (substr ($ this ->baseUrl , -1 ) !== '/ ' ) {
65+ $ this ->baseUrl = $ this ->baseUrl . '/ ' ;
66+ }
67+
68+ $ tabUrl = $ this ->getTabUrl ($ tabName );
69+
70+ if ($ this ->getBrowserUrl () !== $ tabUrl ) {
71+ $ this ->browser ->open ($ tabUrl );
72+ }
73+ $ this ->waitForElementNotVisible ($ this ->tabReadiness );
6474
6575 $ groupElement = $ this ->_rootElement ->find (
6676 sprintf ($ this ->groupBlock , $ tabName , $ groupName ),
@@ -85,24 +95,6 @@ public function getGroup($tabName, $groupName)
8595 return $ blockFactory ->getMagentoBackendSystemConfigFormGroup ($ groupElement );
8696 }
8797
88- /**
89- * Check whether specified group presented on page.
90- *
91- * @param string $tabName
92- * @param string $groupName
93- *
94- * @return bool
95- */
96- public function isGroupVisible (string $ tabName , string $ groupName )
97- {
98- $ this ->openTab ($ tabName );
99-
100- return $ this ->_rootElement ->find (
101- sprintf ($ this ->groupBlockLink , $ tabName , $ groupName ),
102- Locator::SELECTOR_CSS
103- )->isVisible ();
104- }
105-
10698 /**
10799 * Retrieve url associated with the form.
108100 */
@@ -145,24 +137,4 @@ private function getTabUrl($tabName)
145137
146138 return $ tabUrl ;
147139 }
148-
149- /**
150- * Open specified tab.
151- *
152- * @param string $tabName
153- * @return void
154- */
155- private function openTab (string $ tabName )
156- {
157- $ this ->baseUrl = $ this ->getBrowserUrl ();
158- if (substr ($ this ->baseUrl , -1 ) !== '/ ' ) {
159- $ this ->baseUrl = $ this ->baseUrl . '/ ' ;
160- }
161- $ tabUrl = $ this ->getTabUrl ($ tabName );
162-
163- if ($ this ->getBrowserUrl () !== $ tabUrl ) {
164- $ this ->browser ->open ($ tabUrl );
165- }
166- $ this ->waitForElementNotVisible ($ this ->tabReadiness );
167- }
168140}
0 commit comments