Jennifer Ziyuan Huang
Jennifer Ziyuan Huang

Reputation: 41

Selenium IDE : i have some problems with copying some elements

This is my first time to ask a question! (excited!!!)

But i don't have enough reputations to post a image...

i'm trying to use selenium to automatically upload the image and get the result on how-old.net

And after uploading the image, there will be a button "View Source"

So after i clicked "View Source", the JSON part would come out. But i fail to copy that part of element. And although i recorded the behavior of click "View Source", that JSON part doesn't show up when i run the recording in selenium ide. Anyone knows why? THX!

Upvotes: 1

Views: 428

Answers (1)

Fabian Schmengler
Fabian Schmengler

Reputation: 24551

You cannot copy text to the clipboard using Selenium IDE. However, if you want to use the JSON in the textarea later in the script, you can use storeText to save it in a variable:

Selenium IDE Screenshot

The command is storeText(locator, variableName). You can use the variable "the_source" later as ${the_source}

As for your other question: with typeAndWait it works for me, you probably forgot the AndWait part that waits for the triggered request to finish.

Upvotes: 2

Related Questions