How to added figure to caption


I have a problem with figure in google docs, i select the figure and i clicl on added figure caption a message of “select figure to added caption is apeared” in spite of the selection of figure.
can you help me please?


Figure should be a root element in the document for it to work, make sure that its not nested inside any object like table.