How to click Onclick Javascript form using Selenium?
Try with following:
driver.findElement(By.linkText("Add a New Credit Card")).click();
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();