class TopChartsShazamTabLocators: # headers STICKY_HEADER = "//*[contains(@class, 'sticky-header show')]" STICKY_HEADER_SHAZAM_ICON = f"{STICKY_HEADER}//../*[contains(@class, 'icon-shazam')]" 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='shazam-period-dd']" MARKET_DD = "//*[contains(@id, 'market-dd')]" MARKET_DD_ITEM = "//*[contains(@id, 'market-dd-item') and text()='{}']" CITY_DD = "//*[@id='top-charts-shazam-city-dd']" CITY_SELECTED = f"(//*{CITY_DD}/span)[1]" # table column headers chart_shazam_cell = "charts-shazam-cell-" position, trend, image, name, release_date, peak_position, peak_position_date, total_shazams, on_chart_days = \ "position", "trend", "image", "name", "release-date", "peak-position", "peak-position-date", "shazams", "days-on-chart" CELL_POSITION_HEADER = f"//*[@id='{chart_shazam_cell}{position}']" CELL_POSITION_TREND_HEADER = f"//*[@id='{chart_shazam_cell}{trend}']" CELL_IMAGE_HEADER = f"//*[@id='{chart_shazam_cell}{image}']" CELL_TRACK_HEADER = f"//*[@id='{chart_shazam_cell}{name}']" CELL_RELEASE_DATE_HEADER = f"//*[@id='{chart_shazam_cell}{release_date}']" CELL_PEAK_LIFETIME_POSITION_HEADER = f"//*[@id='{chart_shazam_cell}{peak_position}']" CELL_PEAK_LIFETIME_POSITION_DATE_HEADER = f"//*[@id='{chart_shazam_cell}{peak_position_date}'][1]" CELL_TOTAL_SHAZAMS_HEADER = f"//*[@id='{chart_shazam_cell}{total_shazams}']" CELL_ON_CHART_LIFETIME_DAYS_HEADER = f"//*[@id='{chart_shazam_cell}{on_chart_days}']" # table column values CELL_POSITION_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{position}-')]" CELL_POSITION_TREND_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{trend}-')]" CELL_IMAGE_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{image}-')]" CELL_TRACK_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{name}-')]" CELL_RELEASE_DATE_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{release_date}-')]" CELL_PEAK_LIFETIME_POSITION_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{peak_position}-') and not(contains(@id, 'date'))][1]" CELL_PEAK_LIFETIME_POSITION_DATE_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{peak_position_date}-')][1]" CELL_TOTAL_SHAZAMS_VALUES = f"//*[@id='{chart_shazam_cell}{peak_position_date}-']" CELL_ON_CHART_LIFETIME_DAYS_VALUES = f"//*[contains(@id, '{chart_shazam_cell}{peak_position_date}-')][2]"