I'm trying to turn off visibility of a text element called "Draft" on 20 layouts in in an aprx. The script runs without errors, but the element doesn't get turned off on any of the pages.
<SPAN class="keyword token">import</SPAN> arcpy
aprx <SPAN class="operator token">=</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>mp<SPAN class="punctuation token">.</SPAN>ArcGISProject<SPAN class="punctuation token">(</SPAN>r<SPAN class="string token">"C:\Users\kberg\Documents\DataGapEvaluation.aprx"</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">for</SPAN> lyt <SPAN class="keyword token">in</SPAN> aprx<SPAN class="punctuation token">.</SPAN>listLayouts<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">for</SPAN> elm <SPAN class="keyword token">in</SPAN> lyt<SPAN class="punctuation token">.</SPAN>listElements<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'TEXT_ELEMENT'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">if</SPAN> elm<SPAN class="punctuation token">.</SPAN>text <SPAN class="operator token">==</SPAN> <SPAN class="string token">"Draft"</SPAN><SPAN class="punctuation token">:</SPAN>
elm<SPAN class="punctuation token">.</SPAN>visible <SPAN class="operator token">=</SPAN> <SPAN class="token boolean">False</SPAN>
aprx<SPAN class="punctuation token">.</SPAN>save<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">del</SPAN> aprx<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>