String visaFees = "Mumbai";
WebElement element = driver.findElement(By.xpath("//span[contains(text(),'" + visaFees + "')]"));
I am not able to do this using page Factory (@FindBy annotation),
String visaFees = "Mumbai";
@FindBy(xpath = "//span[contains(text(),'" + visaFees + "')]")
WebElement element;
String visaFees = "Mumbai";
@FindBy(xpath = "//span[contains(text(),'" + visaFees + "')]") ==> Error = The value for annotation attribute FindBy.xpath must be a constant expression
WebElement element;
When i move my mouse over xpath that time i get the "The value for annotation attribute FindBy.xpath must be a constant expression"
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CABym8R%2Buxrd%3DVd_Z%2BjLtube7_7rtTgmq11TcKpnC6HR2aqnnWg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAA_T2rHYvwP%2BLzkMMj%2BJvUaOOHRFmyT38%2Ba_ODfNRJ9NMUkgPw%40mail.gmail.com.
Can some please help me on this.
Even I'm looking for some work around how to use dynamic value @FindBy annotation.
Can some please help me on this.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/dfe8dc41-4631-4c3f-858a-22a3cf105203%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/8d7c5dc1-3578-4e20-9986-28b1aed0219f%40googlegroups.com.