@@ -39,12 +39,7 @@ def select_help_filter_btn(self):
39
39
help_sitem = self .locator_finder_by_xpath (help_filter )
40
40
help_sitem .click ()
41
41
time .sleep (3 )
42
-
43
- print ("Closing Analyzers help filter \n " )
44
- help_filter_close = '//button[@class="button-close"][1]'
45
- help_close_sitem = self .locator_finder_by_xpath (help_filter_close )
46
- help_close_sitem .click ()
47
- time .sleep (2 )
42
+ self .webdriver .refresh ()
48
43
49
44
def select_built_in_analyzers_open (self ):
50
45
"""Checking in-built analyzers list and description"""
@@ -215,7 +210,7 @@ def checking_all_built_in_analyzer(self):
215
210
self .select_built_in_analyzers_close ()
216
211
217
212
218
- def add_new_analyzer (self , name , test_data_dir = None ):
213
+ def add_new_analyzer (self , name , ui_data_dir = None ):
219
214
"""Adding analyzer type delimiter with necessary features"""
220
215
# pylint: disable=too-many-locals disable=too-many-branches disable=too-many-statements
221
216
index = self .index
@@ -281,9 +276,7 @@ def add_new_analyzer(self, name, test_data_dir=None):
281
276
frequency = '//div[label[text()="Frequency"]]/input[not(@disabled)]'
282
277
norm = '//div[label[text()="Norm"]]/input[not(@disabled)]'
283
278
position = '//div[label[text()="Position"]]/input[not(@disabled)]'
284
- switch_view_btn = '//*[@id="modal-content-add-analyzer"]/div[1]/div/div[2]/div/div[2]/button'
285
- switch_form_btn = '//*[@id="modal-content-add-analyzer"]/div[1]/div/div[2]/div/div[2]/button'
286
- create = '//*[@id="modal-content-add-analyzer"]/div[3]/button[2]'
279
+ switch_form_btn = "//*[text()='Switch to form view']"
287
280
local_placeholder = '//div[label[text()="Locale"]]//input[not(@disabled)]'
288
281
case_placeholder = '//div[label[text()="Case"]]//select[not(@disabled)]'
289
282
@@ -538,7 +531,7 @@ def add_new_analyzer(self, name, test_data_dir=None):
538
531
539
532
# for nearest neighbor analyzer introduced on 3.10.x
540
533
elif name == "My_Nearest_Neighbor_Analyzer" :
541
- location = test_data_dir / "makedata_suites " / "610_model_cooking.bin"
534
+ location = ui_data_dir / "ui_data" / "analyzer_page " / "610_model_cooking.bin"
542
535
print (f'Selecting model location for { name } \n ' )
543
536
model_location = '//div[label[text()="Model Location"]]//input[not(@disabled)]'
544
537
model_location_sitem = self .locator_finder_by_xpath (model_location )
@@ -553,7 +546,7 @@ def add_new_analyzer(self, name, test_data_dir=None):
553
546
554
547
# for classification analyzer introduced on 3.10.x
555
548
elif name == "My_Classification_Analyzer" :
556
- location = test_data_dir / "makedata_suites " / "610_model_cooking.bin"
549
+ location = ui_data_dir / "ui_data" / "analyzer_page " / "610_model_cooking.bin"
557
550
print (f'Selecting model location for { name } \n ' )
558
551
model_location = '//div[label[text()="Model Location"]]//input[not(@disabled)]'
559
552
model_location_sitem = self .locator_finder_by_xpath (model_location )
@@ -717,18 +710,23 @@ def add_new_analyzer(self, name, test_data_dir=None):
717
710
time .sleep (2 )
718
711
719
712
print (f'Switching current view to form view for { name } \n ' )
713
+ switch_view_btn = '//*[@id="modal-content-add-analyzer"]/div[1]/div/div[2]/div/div[2]/button'
720
714
code_view_sitem = self .locator_finder_by_xpath (switch_view_btn )
721
715
code_view_sitem .click ()
722
716
time .sleep (3 )
723
717
724
718
print (f'Switching current view to code view for { name } \n ' )
725
- form_view_sitem = self .locator_finder_by_xpath (switch_form_btn )
719
+ form_view_sitem = self .locator_finder_by_xpath (switch_view_btn )
726
720
form_view_sitem .click ()
727
721
time .sleep (3 )
728
722
729
723
print (f"Selecting the create button for the { name } \n " )
730
- create_btn = create
731
- create_btn_sitem = self .locator_finder_by_xpath (create_btn )
724
+ if self .package_version >= semver .VersionInfo .parse ('3.11.0' ):
725
+ create = '//*[@id="chakra-modal-2"]/footer/button[2]'
726
+ else :
727
+ create = "//*[text()='Create']"
728
+
729
+ create_btn_sitem = self .locator_finder_by_xpath (create )
732
730
create_btn_sitem .click ()
733
731
time .sleep (2 )
734
732
0 commit comments