Capriciously has 3 different meanings across 1 category:
Adverb
unpredictably
"the weather has been freakishly variable"
in a capricious manner
"there were Turk's head lilies and patches of iris, islands of brilliant blue set capriciously in the green sea"
In a capricious manner; without caution or concern.