Using Selenium's webdriverJS, I have automated tasks on an HTML5 page. To incorporate a CSS selector into a function, I had to rely on XPath for selecting elements:
var complexXpath = "//*/div/a"; /* This is just an example */
var element = mydriver.findElement(mywebdriver.By.xpath(complexXpath));
Now, I am wondering if it's possible to retrieve the CSS of that element, so I can utilize it in another JavaScript function that solely depends on CSS. Is there a way to achieve something like this?
var b = element.getCSS();