Radio button does not get clicked in Selenium / Python

前端 未结 2 542
悲哀的现实
悲哀的现实 2021-01-15 05:56

Folks, this is driving me crazy. I have snippets like the following

2条回答
  •  萌比男神i
    2021-01-15 06:29

    Try using following Css selector:

            Actions action = new Actions(drive);
    
            action.moveToElement(drive.findElement( By.cssSelector("label > input[id^='M37_Q_']"))).build().perform();
    
            drive.findElement( By.cssSelector("label > input[id^='M37_Q_']")).click();
    

提交回复
热议问题