Unable to click on a radio button in Selenium Webdriver

后端 未结 8 406
遥遥无期
遥遥无期 2021-01-23 21:11

I am learning Selenium Webdriver using Java. As a learning example, I tried to open MakeMyTrip, access International Flights page and click on One Way radio but

8条回答
  •  伪装坚强ぢ
    2021-01-23 22:02

    Try below xpath.

    //*[@id="one_way_button1"]/span/input
    

    It should work.

    driver.findElement(By.xpath(//*[@id=\"one_way_button1\"]/span/input)).click();
    

提交回复
热议问题