Advertisement
Vb6solutions

IsElementPresent Click

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