Skip to content

Commit

Permalink
fix: allow element xpath selection without filter
Browse files Browse the repository at this point in the history
  • Loading branch information
adeprez committed Oct 4, 2024
1 parent 05719be commit e9483b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ def find_element(xpath):

self._element = find_element(local_xpath)

if not self._element:
raise ElementNotFoundException(self.xpath)

def exit_context(self):
if hasattr(self, "_element"):
self.driver.switch_to.default_content()
Expand Down
2 changes: 1 addition & 1 deletion lavague-sdk/lavague/sdk/base_driver/javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def js_wrap_function_call(fn: str):
&& (e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth)) {
evts.push('SCROLL');
}
if (filterTypes && evts.length) {
if (filterTypes && filterTypes.length) {
evts = evts.filter(t => filterTypes.includes(t));
}
if (nonInteractives && evts.length === 0) {
Expand Down

0 comments on commit e9483b0

Please sign in to comment.