Skip to content

Commit f11baf3

Browse files
committed
Modified and add some comments
1 parent 13bf31e commit f11baf3

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

modules/browser_object_navigation.py

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,8 @@ def add_bookmark_via_toolbar_other_bookmark_context_menu(
362362
) -> BasePage:
363363
"""
364364
Add a bookmark via the toolbar's Other Bookmarks context menu.
365-
Arguments
366-
----------
365+
366+
Arguments:
367367
bookmark_data : A Bookmark object containing the bookmark details to be added (name, url, tags, keyword)
368368
ba : BrowserActions utility
369369
"""
@@ -386,8 +386,9 @@ def add_bookmark_via_toolbar_other_bookmark_context_menu(
386386

387387
@BasePage.context_chrome
388388
def toggle_bookmarks_toolbar_with_key_combo(self) -> BasePage:
389-
"""Use Cmd/Ctrl + B to open the Print Preview, wait for load"""
390-
389+
"""
390+
Use Cmd/Ctrl + B to open the Print Preview, wait for load
391+
"""
391392
if self.sys_platform() == "Darwin":
392393
mod_key = Keys.COMMAND
393394
else:
@@ -433,8 +434,8 @@ def delete_bookmark_from_other_bookmarks_via_context_menu(
433434
) -> BasePage:
434435
"""
435436
Deletes a bookmark from Other Bookmarks via context menu.
437+
436438
Argument:
437-
----------
438439
bookmark_name: The display name of the bookmark to delete
439440
"""
440441
self.click_on("other-bookmarks-toolbar")
@@ -446,8 +447,8 @@ def delete_bookmark_from_other_bookmarks_via_context_menu(
446447
def delete_bookmark_from_bookmarks_toolbar(self, bookmark_name: str) -> BasePage:
447448
"""
448449
Delete bookmark from bookmarks toolbar via context menu
450+
449451
Argument:
450-
----------
451452
bookmark_name: The display name of the bookmark to delete
452453
"""
453454
self.panel_ui.context_click("bookmark-by-title", labels=[bookmark_name])
@@ -460,8 +461,8 @@ def verify_bookmark_exists_in_toolbar_other_bookmarks_folder(
460461
) -> BasePage:
461462
"""
462463
Verify bookmark exists in Other Bookmarks folder from toolbar
463-
Arguments
464-
----------
464+
465+
Argument:
465466
bookmark_name : The exact name/title of the bookmark to search for in the Other Bookmarks folder.
466467
"""
467468
self.click_on("other-bookmarks-toolbar") # Navigation selector
@@ -486,8 +487,8 @@ def verify_bookmark_does_not_exist_in_toolbar_other_bookmarks_folder(
486487
) -> BasePage:
487488
"""
488489
Verify bookmark does not exist in Other Bookmarks folder from toolbar
489-
Arguments
490-
----------
490+
491+
Argument:
491492
bookmark_name : The exact name/title of the bookmark to search for in the Other Bookmarks folder.
492493
"""
493494
self.click_on("other-bookmarks-toolbar")
@@ -508,12 +509,10 @@ def verify_bookmark_does_not_exist_in_bookmarks_toolbar(
508509
def edit_bookmark_via_star_button(self, new_name: str, location: str) -> BasePage:
509510
"""
510511
Edit bookmark details by opening the edit bookmark panel via the star button
511-
Arguments
512-
----------
513-
new_name : str
514-
The new name/title to assign to the bookmark
515-
location : str
516-
The folder location where the bookmark should be saved
512+
513+
Arguments:
514+
new_name : The new name/title to assign to the bookmark
515+
location : The folder location where the bookmark should be saved
517516
"""
518517
self.click_on("star-button")
519518
self.panel_ui.get_element("edit-bookmark-panel").send_keys(new_name)
@@ -523,6 +522,7 @@ def edit_bookmark_via_star_button(self, new_name: str, location: str) -> BasePag
523522
elif location == "Bookmarks Toolbar":
524523
self.panel_ui.click_on("bookmark-location")
525524
self.panel_ui.click_on("bookmarks-toolbar")
525+
# for else add Bookmark Menu option if needed in the future
526526
self.panel_ui.click_on("save-bookmark-button")
527527
return self
528528

@@ -549,7 +549,8 @@ def verify_edit_bookmark_panel_not_visible_after_navigation(self) -> BasePage:
549549
def open_bookmark_from_toolbar(self, bookmark_title: str) -> BasePage:
550550
"""
551551
Right-clicks bookmark and opens it in a new private window via context menu
552-
Arguments:
552+
553+
Argument:
553554
bookmark_title: The title of the bookmark to open
554555
"""
555556
self.panel_ui.element_clickable("bookmark-by-title", labels=[bookmark_title])
@@ -562,7 +563,8 @@ def open_bookmark_in_new_window_via_context_menu(
562563
) -> BasePage:
563564
"""
564565
Right-click bookmark and opens it in a new window via context menu
565-
Arguments:
566+
567+
Argument:
566568
bookmark_title: The title of the bookmark to open
567569
"""
568570
self.panel_ui.element_clickable("bookmark-by-title", labels=[bookmark_title])
@@ -576,7 +578,8 @@ def open_bookmark_in_new_private_window_via_context_menu(
576578
) -> BasePage:
577579
"""
578580
Right-clicks bookmark and opens it in a new private window via context menu
579-
Arguments:
581+
582+
Argument:
580583
bookmark_title: The title of the bookmark to open
581584
"""
582585
self.panel_ui.element_clickable("bookmark-by-title", labels=[bookmark_title])
@@ -598,8 +601,7 @@ def expect_bookmarks_toolbar_visibility(self, expected: bool) -> None:
598601
"""
599602
Assert the visibility state of the Bookmarks Toolbar.
600603
601-
Arguments:
602-
----------
604+
Argument:
603605
expected (bool):
604606
If True, asserts that the toolbar is visible (collapsed="false").
605607
If False, asserts that the toolbar is hidden (collapsed="true")

modules/browser_object_panel_ui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ def enable_bookmark_tagging(self) -> BasePage:
230230
def edit_bookmark_from_hamburger_menu(
231231
self, new_name: str, tags: str, location: str
232232
) -> BasePage:
233-
"""Edit bookmark details from hamburger menu"""
233+
"""
234+
Edit bookmark details from hamburger menu
235+
"""
234236
self.open_bookmarks_panel_from_hamburger_menu()
235237
self.click_on("bookmark-current-tab")
236238

0 commit comments

Comments
 (0)