Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion prodigyqa/browseractions.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,4 +714,17 @@ def __execute_script(self, script, web_elm=None):
if isinstance(web_elm, dict):
return self.driver.execute_script(
script,
self.__find_element(web_elm))
self.__find_element(web_elm)

def get_element(self, locator: dict):
"""return web element of a locator.
:param locator: dictionary of identifier type
and value ({'by':'id', 'value':'start-of-content.'}).
:type locator: dict
"""
self.locator_check(locator)
self.page_readiness_wait()
if isinstance(locator, dict):
return self.__find_element(locator)
else:
AssertionError("Invalid locator type")
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ opencv-python
flake8==3.7.9
pycodestyle<2.6.0,>=2.5.0
pandas==0.24.2
urllib3==1.25.7
urllib3==1.25.9
requests>=2.21.0
ipdb==0.12.2
ipdb==0.13.2
pytest>=4.0.2
pytest-html<2.1.0
pytest-html<2.2.0
xlrd>=0.9.0
scrapy
loguru
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
'flake8==3.7.9',
'pycodestyle<2.6.0,>=2.5.0',
'pandas==0.24.2',
'urllib3==1.25.7',
'urllib3==1.25.9',
'requests>=2.21.0',
'ipdb==0.12.2',
'ipdb==0.13.2',
'pytest>=4.0.2',
'pytest-html<2.1.0',
'pytest-html<2.2.0',
'xlrd>=0.9.0',
'scrapy',
'nltk',
Expand Down