I've been working on a selenium script for:
My goal is to select the "Add to Compare" element for "Sony Xperia," but it's not being located. I've tried using both cssSelector and xpath, but I can't seem to figure out what I'm doing wrong.
CSS Selector:
div.category-products > ul > li:nth-child(n):contains('Sony Xperia') > div > div.actions > ul > li:nth-child(2) > a
XPath:
//h2/a[@title='Sony Xperia']/ul/li/a[text()='Add to Compare']
NOTE: The cssSelector works in Chrome but doesn't provide any results in Firefox.