Skip to content

Commit

Permalink
release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ClericPy committed Apr 4, 2020
1 parent aca4878 commit 66adc53
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/test_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ def filter_function(r):
assert len(screen) > len(part)
# draw
await tab.set_url('https://draw.yunser.com/')
await tab.mouse_drag_rel_chain(320, 145).move(50, 0, 1).move(
0, 50, 1).move(-50, 0, 1).move(0, -50, 1)
walker = await tab.mouse_drag_rel_chain(320, 145).move(50, 0, 0.2).move(
0, 50, 0.2).move(-50, 0, 0.2).move(0, -50, 0.2)
await walker.move(50 * 1.414, 50 * 1.414, 0.2)
# clear cache
assert await tab.clear_browser_cache()
# close tab
Expand Down
2 changes: 1 addition & 1 deletion ichrome/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .base import Chrome, ChromeDaemon, Tab, Tag
from .logs import logger

__version__ = "1.1.0"
__version__ = "1.1.1"
__tips__ = "[github]: https://github.com/ClericPy/ichrome\n[cdp]: https://chromedevtools.github.io/devtools-protocol/\n[cmd args]: https://peter.sh/experiments/chromium-command-line-switches/"
__all__ = [
'Chrome', 'ChromeDaemon', 'Tab', 'Tag', 'AsyncChrome', 'AsyncTab', 'logger',
Expand Down
9 changes: 9 additions & 0 deletions ichrome/async_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,6 +1091,15 @@ def mouse_drag_rel_chain(self,
start_y,
button='left',
timeout=None):
'''Drag with offset continuously.
Demo::
await tab.set_url('https://draw.yunser.com/')
walker = await tab.mouse_drag_rel_chain(320, 145).move(50, 0, 0.2).move(
0, 50, 0.2).move(-50, 0, 0.2).move(0, -50, 0.2)
await walker.move(50 * 1.414, 50 * 1.414, 0.2)
'''
return OffsetDragWalker(
start_x, start_y, tab=self, button=button, timeout=timeout)

Expand Down

0 comments on commit 66adc53

Please sign in to comment.