I have the following code written in Java with Selenium Webdriver, but it's not clicking the div with the star rating
driver.get("https://goo.gl/maps/gLCX3PitJT1cXr9v9");
driver.findElement(By.xpath("//button[@data-value=\"Escribir una opinión\"]")).click();
driver.switchTo().frame(2);
driver.findElement(By.xpath("//textarea")).sendKeys("This is just a test");
driver.findElement(By.xpath("//span[@aria-label=\"Cuatro estrellas\"]")).click();
Between each line, I also added a Thread.sleep(5000) just to ensure the page fully loads.
The only clear identifier that I see is the aria-label.
Manual steps:
- Open URL: https://goo.gl/maps/gLCX3PitJT1cXr9v9
- Click "Escribir una opinión" or "Write a review" button
- Type in the review field: "This is just a test"
- Select the star rating: 4 stars
- Click "Publicar" or "Post" (or Publish)