You want to copy HTML dropdownlist(combobox) options from a web-page. You do right click on dropdown list. Oh my God !!! There is no option to do it. This article explains how to extract dropdownlist options using Notepad++.
Steps:
1. Open site.
2. Now you need to get HTML source of dropdown list:
For Firefox with Firebug:
Right Click on HTML Dropdownlist, Select Inspect Element and In firebug, Right click and click copy InnerHTML option.
For IE8+:
Press F12, click arrow sign in developer tools and Select Dropdownlist. Now you will see html source is selected in developer tools, right click and click copy InnerHTML option.
For Chrome:
Right Click on HTML Dropdownlist, Select Inspect Element and In Developer Tools, you will see html source is selected. Right click and click Copy as HTML option.
3. Paste HTML source in Notepad++
4. Remove Select tag from top and bottom if exists
5. Put cursor at top of code and Press Ctrl + F
6. Go to Replace Tab and enter following info:
Find What:
<option[^>]*>([^<]*)</option>
Replace With:
\1\n
Select Regular Expression as Search Mode and click on Replace All. If options are already in new line then no need to use \n in Replace With option.
You will get all options in plain text. If there are a lot of options, It will save bunch of time.
Video:
Update (Without Notepad++):
If you want to do it Without Notepad++, refer following post:
Copy DropDownList Data from a Website: Chrome Developer Tools/Firebug Tip
Share your opinion or alternate way to do this in below comment box.
Thank you for your generosity
Thank You so much. Saved me a ton of time.
This save me a lot of time. You are the best
Unfortunately, my Inner HTML has the following
Display1?display TypeAddressAllocated ToDisplay 3display5. Any changes in the RegEx based on this above coding please?
Awesome thanks! Saved me a lot of time.
unbelievably easy. You are GOOD.
thank you very much, this is really a good trick. This will save a lot of time to one of my poor colleague. great post !!!!
Indeed!!! Time Saver…
Thanks, awesome!
Thank you very much
Works great !!!
Thanks !!!
Thanks, this just saved me a lot of emails and calls ;)
Perferct, Thanks a lot! you saved my life :)
Worked perfect, Time saver
Thanks, that worked perfectly!
Hi! I am trying to scrape a select options of a drop down list using a chrome plugin ‘scraper’. asked to input xpath value which i provided as //select. It inputs all the select options as concatenated stream ( without any delimiters ). Any suggestion, how could I add a delimiter ? BTW, your method here works great, I just want to try that approach because i have a massive workload. thanks
Thank you! saved lots of time.
great
Nice one. Thank you
Wow. The best thing that has happened to me in a while. Sad, maybe. But I have weekly research spreadsheets I do and finding this will save me hours upon hours of work. Such joy!!!!
Great tip. Just saved me hours and hours of work. Thank you very very much.
GENIUS!
Thanks!!
This just saved me about 12 hours of work..a drop down with 10,000 items.
thank you so much
So useful! Thanks for sharing!
awesome…..thank you