Home > Net >  Find this element in this website using Selenium
Find this element in this website using Selenium

Time:06-09

I have used Selenium in VBA to get to this page and would like to click on the 'WIP Management' Button. However the code that I use says the element is not found. Could someone please help.

This is the part of the website with the inspect panel

enter image description here

This is my code that can't find the element.

If obj.IsElementPresent(By.XPath("//button[text()='WIP Management']")) Then
    MsgBox "True"
Else
    MsgBox "False"
End If

CodePudding user response:

I can not see the button tag in HTML, try the below locator

//*[text()='WIP Management']

OR

//*[contains(text(),'WIP Management')]

OR

//*[normalize-space()='WIP Management']
  • Related