unibrementypo3auto/content/get_xy_textmedia.py

23 lines
746 B
Python
Raw Permalink Normal View History

2023-05-17 17:43:35 +02:00
from selenium import webdriver
from content.press_wizzard_button import press_wizzard_button
from content.get_list_wizard_sections import get_list_wizard_sections
from content.set_wizard_section import set_wizard_section
from content.get_list_wizard_sections_tools import get_list_wizard_sections_tools
def get_xy_textmedia(driver: webdriver.firefox.webdriver.WebDriver):
press_wizzard_button(driver)
_, labels = get_list_wizard_sections(driver)
media_tools: str = labels[-2]
media_tool_id_textmedia: int = 2
set_wizard_section(driver, media_tools)
center_x, center_y, _, _ = get_list_wizard_sections_tools(driver)
x = center_x[media_tool_id_textmedia]
y = center_y[media_tool_id_textmedia]
return x, y