Results 1 to 3 of 3

Selenium with VBA producing error claiming button is not visible when it is

Threaded View

  1. #1
    Registered User
    Join Date
    10-17-2024
    Location
    argentina
    MS-Off Ver
    10
    Posts
    2

    Exclamation Selenium with VBA producing error claiming button is not visible when it is

    I am using Selenium with Excel VBA, and the website has been working well thus far, including pressing buttons. However, I have gotten to one that will not work no matter what I do. I will add some snippets of the code below.

    This is one snippet that is a button click command that DOES work:
    bot.FindElementById("btnSearch").Click
    bot.Wait 1000

    This is the HTML code for that button above on the respective website:
    <button type="submit" id="btnSearch" class="btn wbx-btn-primary" ng-click="LoadPayorList()">Search</button>

    This is the snippet of code that is having problems:
    bot.FindElementById("btnEditContact").Click
    bot.Wait 1000

    This is the HTML code for the edit contact:
    <button class="btn wbx-btn wbx-btn-primary ng-scope ng-isolate-scope" id="btnEditContact" ng-click="vm.setEditable(true)" ng-disabled="!vm.clientPermissions.hasAccessToMaintainClient" ng-if="vm.client.PAYOR_ID &amp;&amp; !vm.isEditable" show="!vm.clientPermissions.hasAccessToMaintainClient" title="" type="button" wbx-clear-attribute="title"><span>Edit</span></button>

    I have tried using CSS, Xpath, and Jscript and nothing seems to work, I appreciate any suggestions.

    Alright I was able to solve it. Before, I was using the condensed Xpath and only the full xpath would work which I found by inspecting the element, right clicking, and taking the full x path. The correct snippet of code is below for anyone else who may have this issue in the future:


    bot.FindElementByXPath("/html/body/div/div/div/div/div/div/div/div/div/client-attributes-tab/div/div/div/button").Click
    bot.Wait 2000
    Last edited by fm2020; 10-18-2024 at 02:57 PM. Reason: Update

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Error while trying to login to income tax portal from selenium basic
    By Vivek2705 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-26-2023, 12:25 PM
  2. Check if end user has selenium basic installed and error gracefully
    By RingoSimpkins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2022, 01:49 AM
  3. Selenium VBA Run-Time Error 91 - HELP
    By therealdees in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2022, 09:53 AM
  4. [SOLVED] Error Looping Selenium Web Scraping (pls help)
    By therealdees in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-08-2022, 06:57 AM
  5. selenium chrome.driver button click not clickable at point
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-17-2021, 02:29 PM
  6. Excel VBA Chrome Automation Selenium Button click issue
    By udayshetty999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2021, 05:53 AM
  7. [SOLVED] Selenium Basic - Does anyone know if you can change user-agent in selenium basic?
    By 0o0o0 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2021, 03:18 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1