xpath Painless XPath tester for your need Just type something like python xpath.py --url google.com --xpath //div No need for any dependency. Should works for both Python 2 and 3.