[pap] adapt to browser2
Add has-class xpath function

Taken from https://gist.github.com/shirk3y/458224083ce5464627bc