Hi, so I am trying to make a code that basically auto clicks on shoes size and than clicks on the add to cart and i'm kinda stuck and need some help.

This is the code, I am stuck on the highlighted part.

Code:
chrome.extension.sendMessage({action: "isRecordingOn"}, function(response) {
	if(response.action == 'true'){
		var size = response.shoesSize;
		$(function(){
			vv = setInterval(function(){
				$('select[class="radio-value"] option:contains('+size+')').first().attr('selected', true);     // Picks the shoes size
				try{
					document.getElementsByClassName('button btn-cart')[0].click();     // Clicks on the add to cart button
					clearInterval(vv);
				}catch(err){
					console.log("erreur: "+err);
				}
			},100);
		});
	}
});




Thank You.