Rework Selectors generation
- Renamed both `css_selector` and `xpath_selector` both to `generate_css_selector` and `generate_xpath_selector` for clarity and not interrupting the auto-completion while coding. - Added `generate_full_css_selector` and `generate_full_xpath_selector` methods
This commit is contained in:
@@ -169,8 +169,8 @@ class TestParser(unittest.TestCase):
|
||||
def test_selectors_generation(self):
|
||||
"""Try to create selectors for all elements in the page"""
|
||||
def _traverse(element: Adaptor):
|
||||
self.assertTrue(type(element.css_selector) is str)
|
||||
self.assertTrue(type(element.xpath_selector) is str)
|
||||
self.assertTrue(type(element.generate_css_selector) is str)
|
||||
self.assertTrue(type(element.generate_xpath_selector) is str)
|
||||
for branch in element.children:
|
||||
_traverse(branch)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user