0
driver.get("https://www.google.com) 

I want to simulate the process of pressing the Ctrl+Shift+c with selenium

I have tried:

  1.    actions
            .keyDown(Keys.CONTROL)
            .keyDown(Keys.SHIFT)
            .sendKeys("c")
            .build()
            .perform();

  2.    action.sendKeys(Keys.chord(Keys.SHIFT + Keys.CONTROL + "c")).perform();

There are many answers in StackOverflow,but nothing works

Norayr Sargsyan
  • 1,386
  • 1
  • 9
  • 23

1 Answers1

0

You are looking for something like pyautogui selenium actions do not behave as you are expecting.

from selenium import webdriver
import pyautogui

driver = webdriver.Chrome(executable_path=r'C:\\Path\\To\\Your\\chromedriver.exe')
driver.get("https://www.google.com")

pyautogui.hotkey('ctrl','shift', 'c')
Jortega
  • 3,151
  • 1
  • 16
  • 19