Skip to main content Skip to docs navigation

Update the class attribute of and element selected using element finder

On this page
Class::Description
Class::add::className
e.g. Class::add::btn
Now add new class to element using class syntax.
  • <input class="button"> -> <input class="button btn">
Class::remove::className
e.g. Class::remove::btn
Now remove new class from element using class syntax.
  • <input class="button btn"> -> <input class="button">
Class::replace::removeClassName::addClassName
e.g. Class::replace::unlike::like
Now replace one class with another to element using class syntax.
  • <span class="unlike"> -> <span class="like">
Class::clearNow remove all class of element using class syntax.
  • <input class="btn btn-primary button"> -> <input class="">