I've taken a good look around, however haven't been able to find the specific answer i'm after; hoping someone is able to point me in the right direction.
I'm automating a PayPal checkout process with WebDriver 2.53 in Visual Studio 2015 using C# against the Firefox driver. My flow into PayPal is fine, being able to login through the sandbox environment. However when I get to the confirmation screen following the initial login, I appear to be unable to select the continue button.
My code is:
driver.SwitchTo().Frame(driver.FindElement(By.TagName("iframe")));
var emailAddressLogin = driver.FindElement(By.Id("email"));
emailAddressLogin.SendKeys("EMailAddress");
var password = driver.FindElement(By.Id("password"));
password.SendKeys("Password");
var login = driver.FindElement(By.Id("btnLogin"));
login.Click();
driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
var ContinueButton = driver.FindElement(By.XPath("//*[@id=\"confirmButtonTop\"]"));
ContinueButton.Click();
Once it gets to the confirmButtonTop
selection, I'm always returning:
An exception of type 'OpenQA.Selenium.NoSuchElementException' occurred in WebDriver.dll but was not handled in user code. Additional information: Unable to locate element: {"method":"id","selector":"confirmButtonTop"}
I have tried to locate the button via XPath, ID etc but nothing seems to allow the selection and always returned with "Unable to locate element".
Has anyone had issues with the 'continue' button within the PayPal sandbox environment, or advise what i'm missing? I have tried to switch focus but this doesn't seem to work.