I have problems running the matches XPATH method:
@Test(groups = "regression")
@Parameters( { "baseUri", "locale" })
public void testShopping(String baseUri, String locale) throws Exception{
session().allowNativeXpath("false");
String shoppingLink = session().getAttribute("//div[@id='footernav_links']//a[matches(@href,'.*shopping.*')]/@href");
LOGGER.info(shoppingLink);
}
throws excepotion
1:25.871 INFO - Command request: getAttribute[//div[@id='footernav_links']//a[matches(@href,'.*shopping.*')]/@href, ] on session 057af825ff224b16877a61b97b974b72
13:31:25.912 INFO - Got result: ERROR: Element //div[@id='footernav_links']//a[matches(@href,'.*shopping.*')]/ not found on session 057af825ff224b16877a61b97b974b72
13:3
I am using FF3.6 and got the motivation for this code from the article