SyntaxFix
Write A Post
Hire A Developer
Questions
use the text and value attributes instead of the id
driver.findElementByXpath("//input[@value='cancel'][@title='cancel']").click();
similarly for Next.