Jump to content

How to search text in b Tag using Webdriver UDF - (Moved)

Recommended Posts


I am using WD UDF for edge browser. I running a script which will search the text which is in b tag like: <b>test</b>. I tried with below but it is not finding the text . In IE i am using like the below script and its working but using WD UDF edge browser its not working. I am not sure where the scripts are wrong.

Local $pageSource = _IEBodyReadHTML($oIE)

If StringInStr($pageSource, "<b>test</b>")

Using Edge Browser
$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//title[contains(text(), "test")]')


_WD_Attach($sSession, $sString, $sMode = 'html')


Link to post
Share on other sites

Hello Dan,


I configured many scripts using WD UDF and its working fine. I am also using _WD_FindElement to other scripts and no issue. but this B tag HTML i was not able to find the correct selector and how to write. I used the below script, not sure if it correct or not.

$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByTagName, '//title[contains(text(), "test")]')
$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, '//title[contains(text(), "test")]')



Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...