The driver was targeted on residential Blackthorne Road in The Delves at around 3.30pm on Tuesday.
Three suspects made off in the car but eventually abandoned it while being chased by officers and a man was arrested after being caught by a police dog.
A West Midlands Police spokesman said police dog Wez and his handler saw three people escaping from the car thought to have been involved.
PD Wez tracked one of the suspects down and he was detained but the other two escaped.
When the stolen car was searched, police found an imitation firearm and a knife.
Meanwhile the suspect was taken to hospital for treatment after being bitten during the arrest.
He will be questioned about the incident in due course.
Anyone with information is asked to contact WMP via Live Chat or call 101 quoting crime reference number 20WS/229538M/20.
3 males commit attempted carjacking with a handgun in #Walsall before making off in a 🚗 PD Wez's chauffeur sights the 🚗 following it until it is abandoned & 3 🏃♂️🏃♂️🏃♂️ PD Wez detains the driver 🚑 Handgun & 🔪 located in 🚗 by @firearmsWMP Driver also wanted for drugs supply 👏🐕 pic.twitter.com/wGejsnLakR— WMP Dog Section (@WMPDogs) September 22, 2020