I\'m trying to click some buttons and I\'m using the Follow button on twitch as an example.
I used the Selenium IDE to try to get the xpath for the button. What I got as
With PhantomJSDriver, try different locators. Post exceptions if there are any, otherwise post the elemenst's info, e.g. location, text, etc.
driver.findElement(By.xpath("//*[contains(@class, 'profile-actions')]//span[text()='Follow']")).click();
driver.findElement(By.cssSelector(".profile-actions .primary_button > span")).click();