Рет қаралды 42,130
In this video, I have explained XPath operators and XPath functions - and, or, text, contains, starts-with, normalize-space.
XPath (XML Path Language) is a query language for selecting nodes from an XML document.
Or in other words, XPath is a query language for finding elements in an HTML web page.
------ XPath Operators ------
= Tests whether two expressions are equal.
< Tests whether the first expression is less than the second.
<= Tests whether the first expression is less than or equal to the second.
> Tests whether the first expression is greater than the second.
>= Tests whether the first expression is greater than or equal to the second.
!= Tests whether the two expressions are not equal.
and - Tests whether both the first and second expressions are true. If the first expression is false, the second is not evaluated.
or - Tests whether either the first or second expressions are true. If the first expression is true, the second is not evaluated
------ XPath Functions ------
text() - Selects the text nodes of the current context node.
Contains() - Contains method is used when we know about the partial attribute value or partial text associated with the web element.
Starts-with() - starts-with method is used when we know about the initial partial attribute value or initial partial text associated with the web element.
normalize-space() - The normalize-space function ignores the leading, trailing, and repeating white spaces, that means after applying the normalize-space the text become normalized with no line breaks, and give a proper sentence.
------ Examples ------
//td[text()=5000]
//button[@id='refreshBtn' and @value='Refresh']
//button[@id='refreshBtn' or @value='Refresh']
//a[text()='Sign in']
//a[contains(text(),'Sign')]
//button[contains(@class,'sign')]
//div[starts-with(@class,'container')]
//label[normalize-space(text())='First Name']
▶️ Next Video Link: • XPath Axes - ancestor,...
◀️ Previous Video Link: • What is XPath? Types o...
↔️ XPath (XML Path Language) Playlist Link: bit.ly/2RlLdkw
✴ Checkout my other playlists: bit.ly/3gLIAVL
☕ Buy me a coffee: bit.ly/33ljBWc
👑 Join my youtube channel to get access to perks:👇
/ @hyrtutorials
==============================================
==============================================
Connect us @
🔗 Website - www.hyrtutoria...
🔗 Telegram - t.me/hyrtutorials
🔗 Facebook - / hyrtutorials
🔗 LinkedIn - / hyrtutorials
🔗 Twitter - / hyrtutorials
🔗 Instagram - / hyrtutorials
==============================================
==============================================
🙏 Please Subscribe🔔 to start learning for FREE now, Also help your friends in learning the best by suggesting this channel.
#xpath #functions #operators #xpathFunctions #xpathOperators #and #or #text #contains #starts-with #normalize-space #hyrtutorials #webAutomation
how to write xpath using and,selenium interview questions,xpath examples,xpath tutorial,selenium xpath examples,how to write xpath,xpath in selenium
hyr,selenium tutorial,selenium tutorial for beginners,selenium training,selenium testing tutorial,automation testing tools,software testing tools,selenium webdriver training,html controls,selenium webdriver,Absolute XPath,root element,tagname,attribute,attribute value,web automation,selenium xpath,xpath tutorial,dynamic xpath,selenium automation,selenium xpath java,selenium xpath tutorial,dynamic xpath in selenium webdriver,dynamic xpath in selenium using different approaches,xpath contains,xpath text,xpath,xpath tutorial selenium,how to write xpath in selenium webdriver,xpath in selenium,xpath tutorials,relative xpath,selenium dynamic xpath,xpath examples,absolute xpath and relative xpath,xpath expression,xpath in selenium webdriver,xpath tutorial for beginners,webdriver xpath
hyr tutorials,h y r tutorials,xpath functions,xpath functions in selenium,xpath functions in xml,xpath functions example,xpath starts with and ends with,xpath normalize-space,xpath and or,xpath functions tutorial,xpath functions in selenium java,xpath text function,selenium xpath functions,xpath functions with example,types of xpath,xpath starts-with,xpath function,xpath multiple attributes,XPath Operators,XPath Operators & XPath Functions,xpath,webdriver, xpath normalize space
yadagiri reddy, yadagiri reddy h, h yadagiri reddy, h y reddy