samedi 22 avril 2017

How do you select a button using chrome driver based on class name only?

I am using Selenium Chrome driver/ C# to select buttons on a website. They don't have id tags only the class tags. How do I select these types of button.

Usually I would do something like this if I have the Id.

 var _SignInButton = driver.FindElement(By.Id("SignInButton"));
_SignInButton.Click();

Example of one these buttons class name is

class="button-71444407 blue-3811567280"




Aucun commentaire:

Enregistrer un commentaire