Relative Content

Tag Archive for cssselenium-webdriverwebdriverplaywrightplaywright-python

Playwright issue: locator resolved to 2 elements

I have decided to undertake quite a challenging project without much programming knowledge but with significant help of ChatGPT 4o (Plus Version). I have built a custom python script and running it in my terminal. I am using a MacBook Pro M1 arm64. What I am trying to do for now is automate a process where I open a wbsite, login, then nevigate through a few menus and then analyse a timetable. I am having issues in the navigation step. The login part runs smoothly but when it gets to clicking on a certain menu tab it tells me “waiting for locator(“a.nav:has-text(“xyz”)”) – locator resolved to 2 elements”. Btw the script opens up Nightly browser. I have tried finding a solution in these forums but I could not extract any useful information from them. I have the page source and it seems like there are indeed two elements – one in <META<, other in /table>. If you have any advice, I would highly appreciate your help! Also please keep in mind that my programming skills are beginner level. Thank you!