diff --git a/README.md b/README.md index dcbb128..f1666b7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ -# Selenium-Profiles V2 +# Selenium-Profiles * Overwrite **device metrics** using Selenium * Mobile and Desktop **emulation** * **Undetected** by Google, Cloudflare, .. * [Modifying headers](#Modify-headers) supported using [Selenium-Interceptor](https://github.com/kaliiiiiiiiii/Selenium-Interceptor) +* [Touch Actions](#Touch_actions) for the latest features, have a look at the `dev`branch @@ -125,6 +126,45 @@ driver.get("https://modheader.com/headers?product=ModHeader") Don't forget to execute `cdp_listener.terminate_all()` +### Touch_actions + +Example demonstration script +```python +from selenium_profiles.driver import driver as mydriver +from selenium_profiles.profiles import profiles + +from selenium_profiles.scripts.touch_actions import touch_action_chain, mid_location + +from selenium.webdriver.common.by import By + + +# Start Driver +mydriver = mydriver() +profile = profiles.Android() +driver = mydriver.start(profile, uc_driver=False) # or .Android + +# initialise touch_actions +touch_actions = touch_action_chain(driver) + +driver.get("https://cps-check.com/de/multi-touch-test") + +touch_box = driver.find_element(By.XPATH,'//*[@id="box"]') # Get element +location = mid_location(touch_box) # get element middle location + +# setup actions +touch_actions.pointer_action.move_to_location(location['x'],location['y']) +touch_actions.pointer_action.pointer_down() + +# perform actions +touch_actions.perform() + +# now you should see a touch indication point on the Website + +# quit driver +input('Press ENTER to quit Driver\n') +driver.quit() +``` + ### To export a profile: go to [https://js.do/kaliiiiiiiiiii/get_profile](https://js.do/kaliiiiiiiiiii/get_profile) in your browser and copy the text.