We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66c561e commit 7c55919Copy full SHA for 7c55919
pywhatkit/core/core.py
@@ -43,13 +43,13 @@ def close_tab(wait_time: int = 2) -> None:
43
44
def findtextbox() -> None:
45
"""click on text box"""
46
- global location
47
dir_path = os.path.dirname(os.path.realpath(__file__))
+ location = locateOnScreen(f"{dir_path}\\data\\pywhatkit_smile1.png")
48
try:
49
- location = locateOnScreen(f"{dir_path}\\data\\pywhatkit_smile1.png")
50
- except ImageNotFoundException or location is None:
+ moveTo(location[0] + 150, location[1] + 5)
+ except Exception:
51
location = locateOnScreen(f"{dir_path}\\data\\pywhatkit_smile.png")
52
- moveTo(location[0] + 150, location[1] + 5)
53
click()
54
55
0 commit comments