'How to Xpath from Form

I have html code like:

<form class="variations_form cart" action="https://example.com/name-of-product" method="post" enctype='multipart/form-data' data-product_id="386" data-product_variations="[{&quot;attributes&quot;:{&quot;attribute_pa_czas-realizacji&quot;:&quot;24h&quot;},&quot;availability_html&quot;:&quot;&lt;p class=\&quot;stock out-of-stock\&quot;&gt;Brak w magazynie&lt;\/p&gt;\n&quot;,&quot;backorders_allowed&quot;:false,&quot;dimensions&quot;:{&quot;length&quot;:&quot;&quot;,&quot;width&quot;:&quot;&quot;}]">

I would like to extract "Brak w magazynie".

I have tried xpath:

//*[text() = 'Brak w magazynie']

but it doesn't work. Any idea how to do it? :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source