How to add html attributes to wordpress menu that have sublists

I want to code bootstrap collapsing navbar for wordpress menu.
I found that how can i add html attributes in this link
but i don’t know how to add html attributes just to <li> that have submenu

Thanks