Hello,
I’m still trying to get the hang of asking the right questions. But in my code I am trying to make a IF statement that if true it clicks “Viewdets” and then click the button “Pay”. However, it will not press “pay” button, after it clicks “viewdata”. So my question is am I missing something in my code to where after “viewdets” is passed it doesn’t click the “pay” button?
if (!driver.findElements(By.id(viewdets)).isEmpty()) {
driver.findElement(By.id(viewdets)).click();
//App Closes and Doesn't Click Pay Button
driver.findElement(By.id(pay)).click();
driver.findElement(By.id(conpay)).click();
//If not then continue to stall and check in
} else {
Thread.sleep(7000);
driver.findElement(By.id(stall)).click();
driver.findElement(By.id(two)).click();
driver.findElement(By.id(three)).click();
driver.findElement(By.id(next)).click();
wait = new WebDriverWait(driver, 15);
wait.until(ExpectedConditions.elementToBeClickable(By.id(pay)));
driver.findElement(By.id(pay)).click();
driver.findElement(By.id(conpay)).click();
driver.findElement(By.id(receipt)).click();