Let's say you have the feat Crossbow Expert, with a Rapier in one hand and a hand crossbow in the other. You're a Battle Master Fighter with the Trip Attack maneuver, and your target is flying. Can you take the attack action and attack with your Rapier (PHB 194 specifies that you can attack a "location" even if there's no enemy there.), trigger crossbow expert, and before your Rapier attack happens, shoot your target with a crossbow bolt, use the trip attack manuever, and have them fall into the reach of your melee attack? Would you then have advantage on that melee attack because the target is prone?
More generally, when exactly are you able to take bonus action attacks that trigger "when you take the attack action" or "When you use the attack action and attack"?
More generally, when exactly are you able to take bonus action attacks that trigger "when you take the attack action" or "When you use the attack action and attack"?