Ruthenium red tests for presence and purity of mucilage. Then you can test mucilage for carbohydrate using Molisch's test and polysaccharides using iodine. Spectral analysis will isolate other chemicals such as tannins and phenols. The weight, mass or volume of mucilage can be determined by comparing intact samples with those that have the mucilage removed by pressurised water or ultrasound :)