TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

WebDriver Locating Strategies By XPath Using Double Slash

WebDriver Locating Strategies By XPath Using Double Slash with Introduction, features, selenium basic terminology, what is selenium, selenium limitations, selenium vs qtp, tool suite, selenium ide, ide-installation, ide-features, ide-first test case, ide-commands, ide-creating test cases manually, ide-login test etc.

<< Back to WEBDRIVER

Locating Strategies- (By XPath- Using Double Slash)

In this section, you will learn how to locate a particular web element by XPath- Using Double Slash.

Double Slash mechanism is also known as finding elements using Relative XPath. Double slash is used to create XPath with relative path i.e. the XPath would be created to start selection from anywhere within the document. - Search in a whole page (DOM) for the preceding string.

Note: Double Slash is recommended when you don't have a suitable id or name attribute for the element you want to locate.

Using Double Slash/Relative XPath, we can write the Java code along with the dynamic XPath location as:

findElement(By.xpath("//form/div[1]/div/div[1]/div/div/input[1]")); 





Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf