My wifi would not turn on and the "turn on wifi" in network preferences wouldn't work. The computer says no hardware present. This is a 2013 Macbook air. I took it to the store and they ran diagnostics and said it was working fine. I drove home to the same problem. I bought the screw driver set on amazon to open the computer case. I found the two cables on the end of the wifi card have snap on connection to the board. One was loose and upon inspecting it I found the outside of the snap on connector was a little out of shape so it did not snap on as tightly as the other connector. I carefully bent it back out and snapped in back on and found it to be tighter and that was the fix after having wifi intermittently going out for the last few months. The computer had never been opened before so it must have been bent slightly during the original build of this computer and it finally loosened enough to lose connection.
Buy the screw driver and open it up and take a careful look with a magnifying glass.