Advertisement
Vb6solutions

IsElementPresent Click

Nov 13th, 2023 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VisualBasic 0.54 KB | Software | 0 0
  1. Dim vXpathClick As String
  2. '/html/body/div[1]/div/span[2]/div/span/div/div/div/div/div/div[2]/div/div
  3.  
  4. vXpathClick = "/html/body/div[1]/div/span[2]/div/span/div/div/div/div/div/div[2]/div/div/div/div"
  5. If Web.IsElementPresent(FindBy.xpath(vXpathClick)) Then
  6.     Set SearchInput = Web.FindElement(FindBy.xpath(vXpathClick))
  7.     If SearchInput.IsDisplayed = True Then
  8.         'Web.Actions.MoveToElement(SearchInput).Perform
  9.        Web.Actions.MoveToElement(SearchInput).Click
  10.         Is_Mob_No_Invalid = True
  11.         Exit Function
  12.     End If
  13. End If
Tags: Vb6 Selenium
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement