I want to get the attributes of a button when clicking on it, when using a Chromedriver component, for instance : exactly what I get when I right-click -> Inspect with my browser (Chrome or Firefox). How can I can get such info, if it's possible, in view to replay a web session, after such memorizing with Selenium. At the moment, I can simulate a click on a button, knowing it's CSS-selector, for instance. I just want to know if I can get the CSS-SElector, using Selenium, and clicking by hand (human action, so), avoiding a pre right-click -> Inspect with a classical browser.
browser = new ChromeDriver();
browser.Navigate().GoToUrl("https:/twitter.com/EmiratesTeamNZ");
I want to get classname, or CSS-selector or Xpath of a like and retweet button being on the page, when I click on it. This code, got here,don't work
browser.ExecuteAsyncScript("return window.getComputedStyle(document.querySelector('.SomeTitle .bar'),':before').getPropertyValue('content')");
Any idea ? Tx a lot for your help.