Jesse_Pinkman Jesse_Pinkman - 3 months ago 28
PHP Question

PHPUnit Selenium - can't find element by CSS

I am using selenium to test our software, but I have run into a problem.
There is a button like this :

<button data-action="show-more" class="btn btn-link btn-invisible more padded">Viac potenciálne zmluvy...</button>

And I am trying to select it with


And it just doesn't work. I have tried deleting some of the classes or using className - still nothing.

What am I doing wrong ?

Thank you very much


The first part of your selector is "btn" which is a class so it should be ".btn". I would go one step further and add the tag name to the front to make it a little more specific which would make the selector: