How to click Onclick Javascript form using Selenium?

后端 未结 3 1628
悲&欢浪女
悲&欢浪女 2021-02-15 10:31

This is my source code :

Add a
3条回答
  •  执念已碎
    2021-02-15 11:01

    You can also use following xpath codes:

    driver.findElement(By.xpath("//a[@onclick='gotoPaymentAddressForm()']")).click();
    

    or

    driver.findElement(By.xpath("//a[contains(text(),'Add a New Credit Card')]")).click();
    

提交回复
热议问题