I would suggest that you change duplicated ID and name or add a dusk attribute that you can use to locate the element.
Oct 20, 2021
3
Level 1
Laravel Dusk
I am not able to enter values in text using XPath, could anyone suggest me how I can achieve this using XPath. I have used this but not succed $browser->driver->findElement( WebDriverBy::xpath("//html/body/div[1]/div/div[2]/div[2]/div[2]/div[2]/div/div/form/div[1]/input",$usernametosend) ); $sel = $browser->driver->findElement( WebDriverBy::xpath("//html/body/div[1]/div/div[2]/div[2]/div[2]/div[2]/div/div/form/div[2]/input",$passwordtosend) ); $browser->type('username',$usernametosend);
The issue is having the same name, class, and id for two different text boxes.
Please or to participate in this conversation.