title: VBA-Wedriver-Selenium-Xpath - Modify Class Value - Click Button -Excel
body: <p>I am opening a website using Chrome Webdriver.
  I wanted to Modify value to 12 instead of 10 in a box</p>
  <p>HTML Code</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="input-currency input-colors"&gt;
      &lt;input type="tel" autocomplete="off" class="input-currency__input" data-test="deal-amount-input" maxlength="9" value="10" /&gt;
      &lt;div class="input-currency__values"&gt;&lt;span class="input-currency__value"&gt;10&lt;/span&gt;&amp;nbsp;&lt;span class="input-currency__sign psign"&gt;Đ&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>My Codes</p>
  <pre><code>Dim Bot As WebDriver
  Dim posts As WebElements, post As WebElement
  Set Bot = New WebDriver
  Bot.Start &quot;chrome&quot;
  Bot.Get &quot;https://olymptrade.com/platform#&quot;
  
  Bot.FindElementsByXPath(&quot;//span[contains(@class,'input-currency__value')]&quot;).Values = 12
  Bot.FindElementByClass(&quot;input-currency input-colors&quot;).Text
  </code></pre>
  <p>Also there is a button of Buy with Green color, I wanted to click on it.</p>
  <p>HTML Code</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="deal-buttons__item deal-buttons__item_up"&gt;
      &lt;button data-test="deal-button-up" class="deal-buttons__button deal-buttons__button_up"&gt;
          &lt;span&gt;
              &lt;span class="deal-buttons__text"&gt;80%&lt;/span&gt;
              &lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#FFF" fill-opacity="0.5" class="deal-buttons__svg deal-buttons__svg_arrow"&gt;
                  &lt;path d="M14.6 8l-8.3 8.3a1 1 0 0 0 1.4 1.4L16 9.4V17a1 1 0 0 0 2 0V7a1 1 0 0 0-1-1H7a1 1 0 1 0 0 2h7.6z"&gt;&lt;/path&gt;
              &lt;/svg&gt;
          &lt;/span&gt;
      &lt;/button&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>My Code</p>
  <pre><code>Bot.FindElementsByXPath(&quot;//span[contains(@class,'deal-buttons__text ')]&quot;).Click
  Bot.FindElementsByXPath(&quot;//button[contains(@class,'deal-buttons__button deal- buttons__button_up')]&quot;).Click
  </code></pre>
  <p>I wanted to change the value and Click on buy button using selenium webdriver</p>
  <p>provide me hint on my mistake</p>