def click_menu_button(self, locator, x_offset=0, y_offset=0):
        """Clicks a menu button.

        ``locator`` is the locator of the menu button or Menu item object.
        Locator syntax is explained in `Item locators`.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to define the coordinates to click at,
        relative to the center of the item.
        """
        menu_button = self.state._get_typed_item_by_locator(Menu, locator)
        Clicks.click(menu_button, x_offset, y_offset)
    def click_item(self, locator, x_offset=0, y_offset=0):
        """Clicks an item.

        ``locator`` is the locator of the item or object of an item.
        Locator syntax is explained in `Item locators`.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to fine tune
        mouse position relative to the center of the item.
        """
        item = self.state._get_item_by_locator(locator)
        Clicks.click(item, x_offset, y_offset)
    def click_button(self, locator, x_offset=0, y_offset=0):
        """Clicks a button.

        ``locator`` is the locator of the button or Button item object.

        Locator syntax is explained in `Item locators`.

        Optional arguments ``x_offset`` and ``y_offset`` can be used to fine tune
        mouse position relative to the center of the item.
        """
        button = self.state._get_typed_item_by_locator(Button, locator)
        Clicks.click(button, x_offset, y_offset)