01.12.2015 - you can't use the compound class in xpath. Try below code log_but2 = "//button[@data-popup='login']" .