File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,17 +270,25 @@ async def footer_section_license_link(self):
270270
271271 @pytest .mark .asyncio
272272 async def content_page_previous_next_page_bar_is_visible (self ):
273- return await self .page .locator (
274- "div.PrevNextBar__BarWrapper-sc-13m2i12-3"
275- ) .is_visible ()
273+ prevnext_locator = self .page .locator ('[data-analytics-region="prev-next"]' )
274+ await prevnext_locator . scroll_into_view_if_needed ()
275+ return await prevnext_locator .is_visible ()
276276
277277 @pytest .mark .asyncio
278278 async def click_content_page_previous_link (self ):
279- await self .page .locator ("a" ).get_by_text ("Previous" ).click ()
279+ prev_locator = self .page .locator (
280+ '[data-analytics-region="prev-next"] [data-analytics-label="prev"]'
281+ )
282+ await prev_locator .scroll_into_view_if_needed ()
283+ await prev_locator .click ()
280284
281285 @pytest .mark .asyncio
282286 async def click_content_page_next_link (self ):
283- await self .page .locator ("a" ).get_by_text ("Next" ).click ()
287+ next_locator = self .page .locator (
288+ '[data-analytics-region="prev-next"] [data-analytics-label="next"]'
289+ )
290+ await next_locator .scroll_into_view_if_needed ()
291+ await next_locator .click ()
284292
285293 @pytest .mark .asyncio
286294 async def subject_listing_book_is_visible (self ):
You can’t perform that action at this time.
0 commit comments