Deleted duplicate codes, calling new functions from old ones
New Tests for Function get_element_by_attribute() + get_elements_by_class() + get_elements_by_attribute() + Bug fixing of functions
Review as requested by dstftw
changes as requested
Checked with flake8
In pycodestyle 2.1.0, E305 was introduced, which requires two blank
lines after top level declarations, too.
See https://github.com/PyCQA/pycodestyle/issues/400
See also #10689; thanks @stepshal for first mentioning this issue and
initial patches