I am trying to pass an xpath as a parameter(redirectButton):
WebElement zoomLogo = driver.findElement(By.xpath(redirectButton));
Line in testsuite.xml looks like this:
<parameter name="redirectButton"
value=""//img[@alt='zoom logo colour long']")" />
But when I try to run the test through the testsuite file using testng it shows the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string '"//img[@alt='zoom logo colour long']")' is not a valid XPath expression.
I am sure I have proper xpath because when I paste it directly into the code then everything works fine, but when I try to do it via parameter its not working.
Is it possible to do it by parameters?