What is the easiest way to copy the contents of a drop-down list from a website? - Quora

PHOTO EMBED

Wed Oct 28 2020 13:58:21 GMT+0000 (UTC)

Saved by @meisernator

Kapil Soni, Web Developer at Consagous Technologies (2018-present)
Answered June 7, 2017 · Author has 152 answers and 402.3K answer views
1. Open website, right click on drop-down list and click “Inspect element in Firebug“.
2. Right click on selected element in Firebug and “Copy XPath”
3. Open Console tab in Firebug and put following script:

?

var obj = $x('xpath here' + '/option');

for(var i=0;i<obj.length;i++){

console.log(obj[i].text);

}

4. Replace “xpath here” with copied xpath. (Don’t remove single quote)
5. Click ‘Run‘ to execute script.
6. you will get the data in result, select and copy it.

10.3K viewsView 5 Upvoters · Answer requested by Priyanka Panchal
content_copyCOPY

https://www.quora.com/What-is-the-easiest-way-to-copy-the-contents-of-a-drop-down-list-from-a-website