Skip to content

Configure clipboard permission #1295

Answered by mdmintz
tobihans asked this question in Q&A
May 5, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

Hi @tobihans,
For setting custom Chromium options, you can add the following to your pytest run command:

--chromium-arg="ARG=N,ARG2"  # (Set Chromium args, ","-separated, no spaces.)

If you're just trying to copy/paste some text, you might not even need to use the clipboard. You can grab the text of an area by using: self.get_text(selector). Then, there are several ways of pasting the text in. For a pure paste, you can do self.add_text(selector, text) / self.send_keys(selector, text), or if replacing existing text, use self.type(selector, text), which clears the text field before putting in the text.

When running on a headless Linux display, you can add --xvfb to pytest so that you use a …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@tobihans
Comment options

@mdmintz
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants