Sounds like you are new to the mechanical side of things... First thing... stop making sparks! You are going to ruin something for sure; wait till you have a positive plan of attack before going forward.
OK... when the bike wouldn't start and wouldn't run; it was because the battery had discharged. Since you were riding the bike, it would seem to indicate a charging problem. The way charging works, your alternator makes AC; probably three legs of AC that are combined and turned to DC in the regulator/rectifier. This device also limits the amount of DC power provided to the bike. If the bike is discharging while you are riding, one of four things can be wrong that come readily to mind:
1. running some gizmo that draws more power than the battery can be charged with and the bike can handle
2. bad battery
3. loose or disconnected wire
4. bad regulator/rectifier
5. bad generator
The easiest call will be #2. Do you have spotlights, electric vest and electric gloves or some other electrical gizmo that can overwhelm the bike's electrical system? If so, remove this stuff. If not, go to next step.
OK... no electric vest? You mentioned bad battery... the solenoid clicking means the NEW battery is holding a small charge but not strong enough to turn the starter clutch. Hmmm... bad battery... another bad battery... When you buy a bike battery, you typically have to fill the cells to the top line indicated on the battery with supplied BATTERY ACID. Did you do that? Then you have to put a slow-charge trickle charger on the battery and it takes 12 hours for a battery to charge fully. If you fail to do either step with a new battery, it WILL not hold a charge as well as it should. OK. How did you test the first "toast" battery? Did you use a hydrometer? This is a gizmo that looks like a large eye dropper and the clear part is filled with small colored balls. You draw in some battery acid and it tests the specific gravity of the cell to see if the cell has sulfated. In other words, if all the balls float, you are OK; if one or more sink, the cell is either partly sulfated (ruined) or totally bad. In any case, you can buy a hydrometer in an autoparts store for a couple bucks. If you have a maintenance free battery, you can get it tested at the autoparts store. ANYWAY... you have a new battery and it was charged per my instructions, then move on to the next step.
Loose wire? OK; you have three wires coming off your alternator. They will come up and connect with the regulator/rectifier. On older Kaws, they are all yellow OR blue, pink and yellow. Remove the wires, clean with ELECTRICAL CONTACT CLEANER and dab with dielectric grease. This set of wires provides AC to the reg/rec. Next, out of your regulator/rectifier will be a heavier gauge WHITE or WHITE/RED wire or wires. The way the reg/rec gets power to the bike is via these wires. There will be a wire that goes down and connects to the POSITIVE post on the starter solenoid. This is the wire that provides VDC to the battery because the hot battery cable is also connected to that solenoid lug. The other leg or other wire out of the reg/rec will run to the fuse box and be the IN to the MAIN FUSE... if any of these connections are loose, especially the one to the battery or corroded/dirty, your battery won't charge. If the wires are OK, go to next step.
The regulator/rectifier takes that AC and makes it DC and makes sure the level of the DC voltage is correct. Charge that battery and start the bike. Get your multimeter and put it in VDC scale. Put the POS probe on the POS battery terminal and NEG probe on negative terminal. At idle, you should see about 12.5 VDC and then rev engine. At 4K rpm, you should see about 14.5 VDC. If you get significantly higher or lower, your reg/rec is bad and needs to be replaced unless the generator isn't doing its job. If you see a problem here, reconnect the reg/rec first and go to next step.
Last step... unhook the three wires from your generator where they connect to the reg/rec. Start the bike... yeah, it will run fine till the battery discharges because it is running on the battery you just charged. Put the meter in AC and use the probes to check for AC across all possible combos of the three legs. In other words, if you put the black probe in the #1 leg and the red in the #2, you should see an AC voltage reading. You will have somewhere between 40-70 VAC per pair tested. The point is, you should have the same no matter how you place the probes. Test all combos... if you have good AC, then you can bet that the reg/rec was the culprit.