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
6 changes: 5 additions & 1 deletion humancursor/utilities/web_adjuster.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
import random

from selenium.common.exceptions import MoveTargetOutOfBoundsException
Expand All @@ -8,6 +9,9 @@
from humancursor.utilities.calculate_and_randomize import generate_random_curve_parameters, calculate_absolute_offset


logger = logging.getLogger( "humancursor.utilities.web_adjuster" )


class WebAdjuster:
def __init__(self, driver):
self.__driver = driver
Expand Down Expand Up @@ -117,7 +121,7 @@ def move_to(
self.__action.perform()
except MoveTargetOutOfBoundsException:
self.__action.move_to_element(element_or_pos)
print(
logger.error(
"MoveTargetOutOfBoundsException, Cursor Moved to Point, but without Human Trajectory!"
)

Expand Down
6 changes: 5 additions & 1 deletion humancursor/web_cursor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from time import sleep
import random

Expand All @@ -7,6 +8,9 @@
from humancursor.utilities.web_adjuster import WebAdjuster


logger = logging.getLogger( "humancursor.web_cursor" )


class WebCursor:
def __init__(self, driver):
self.__driver = driver
Expand Down Expand Up @@ -163,7 +167,7 @@ def scroll_into_view_of_element(self, element: WebElement):
"""User should input correct coordinates of x and y, cant take any action"""
return True
else:
print("Incorrect Element or Coordinates values!")
logger.warning("Incorrect Element or Coordinates values!")
return False

def show_cursor(self):
Expand Down