New/different xpath for same action

20 views
Skip to first unread message

Muhammad Junaid Raza

unread,
May 26, 2024, 3:04:18 PMMay 26
to Selenium Users
Hi
I have to perform a Click action on an item from menu, but every time that item changes as i move to next item and try to perform Click action the underlying xpath/css is different

as one point it brings below
xpath=//div[@id='menu_container_474']/md-menu-content/md-menu-item[2]/button/span

on next item for same action it brings below
xpath=//div[@id='menu_container_523']/md-menu-content/md-menu-item[2]/button

What is the best way to handle such situation?

Thanks

Reply all
Reply to author
Forward
0 new messages