class TopChartsAmazonTabLocators: # headers STICKY_HEADER = "//*[contains(@class, 'sticky-header show')]" STICKY_HEADER_AMAZON_ICON = f"{STICKY_HEADER}//../*[contains(@class, 'icon-amazon')]" STICKY_HEADER_TOP_TRACKS = f"{STICKY_HEADER}//../*[text()='Top tracks']" STICKY_HEADER_MARKET_GENRE_DATE = f"{STICKY_HEADER}//../*[@tag]" STICKY_HEADER_CLOCK_ICON = f"{STICKY_HEADER}//../*[contains(@class, 'icon-time')]" CHARTS_TABLE_HEADER_NON_STICKY = "//*[contains(@class, 'tableHeader') and not(contains(@class, 'show'))]" CHARTS_TABLE_HEADER_STICKY = "//*[contains(@class, 'sticky-header show')]" CHARTS_TABLE_SUB_HEADER_STICKY = "//*[contains(@class, 'tableHeader show')]" # buttons and dropdowns BACK_TO_TOP_BUTTON = "//*[contains(@class, 'backToTop show')]" PERIOD_DD = "//*[@id='amazon-period-dd']" MARKET_DD = "//*[contains(@id, 'market-dd')]" MARKET_DD_ITEM = "//*[contains(@id, 'market-dd')][text()='{}']" GENRE_DD = "//*[@id='--genre-dd']" GENRE_SELECTED = f"(//*{GENRE_DD}/span)[1]" # table column headers chart_amazon_cell = "charts-amazon-cell-" position, trend, image, title, genre, peak_position, peak_position_date = \ "position", "trend", "image", "title", "genre", "peak-position", "peak-position-date" CELL_POSITION_HEADER = f"//*[@id='{chart_amazon_cell}{position}']" CELL_POSITION_TREND_HEADER = f"//*[@id='{chart_amazon_cell}{trend}']" CELL_IMAGE_HEADER = f"//*[@id='{chart_amazon_cell}{image}']" CELL_TRACK_HEADER = f"//*[@id='{chart_amazon_cell}{title}']" CELL_GENRE_HEADER = f"//*[@id='{chart_amazon_cell}{genre}']" CELL_PEAK_LIFETIME_POSITION_HEADER = f"//*[@id='{chart_amazon_cell}{peak_position}']" CELL_PEAK_LIFETIME_POSITION_DATE_HEADER = f"//*[@id='{chart_amazon_cell}{peak_position_date}'][1]" CELL_ON_CHART_LIFETIME_DAYS_HEADER = f"//*[@id='{chart_amazon_cell}{peak_position_date}'][2]" # table column values CELL_POSITION_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{position}-')]" CELL_POSITION_TREND_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{trend}-')]" CELL_IMAGE_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{image}-')]" CELL_TRACK_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{title}-')]" CELL_GENRE_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{genre}-')]" CELL_PEAK_LIFETIME_POSITION_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{peak_position}-') and not(contains(@id, 'date'))][1]" CELL_PEAK_LIFETIME_POSITION_DATE_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{peak_position_date}-')][1]" CELL_ON_CHART_LIFETIME_DAYS_VALUES = f"//*[contains(@id, '{chart_amazon_cell}{peak_position_date}-')][2]"