11. More web locators | Using "contains" and "starts-with" in web locators

Опубликовано: 08 Май 2023
на канале: Tech Edinam
70
4

Web locators
In this video, we talk about ways to use a part of a text or string to select an HTML element on the page. With the "contains" function, it is possible to use just a part of the an element text to select that particular element. It can be at the beginning, middle or the end, where as with the "starts-with" function/method, the text which is provided has to be at the beginning of the text of the element.


NOTE
If for some reason, the video is blurry, click the settings icon on the bottom right of the player, then click "Quality" and then choose "1080p". That should fix it. Thank you

=============================================================
If you would like to use the web apps I run locally during the tutorials, you can download them from my github page with this link https://github.com/techEdinam/resourc...


-When you have visited that link from above, make sure you are in the master branch and click the "Code" button. A dropdown appears with two tabs; Local, and Codespaces. Make sure the "Local" tab is selected and click the "Download ZIP" link. That should download the entire resources repository to the "Downloads" folder or any destination you chose on your computer.

-Extract the files by right-clicking on the downloaded folder and click "Extract all".
When the extraction is done, you can copy the "resources" folder to any other location you prefer. Whether on the desktop or in your documents folder. Feel free to rename the folder from "resources-master" to "resources"

-Now, with your preferred IDE or text editor, open the "resources" folder by going to File menu and clicking on open folder, and choose the "resources" folder. The project should be displayed on the left hand side of the text editor/IDE by default

-Any file ending with the extension .html can be opened by right-clicking that file and clicking on open.
Some of the projects were created using react.js. These projects will have a readme.md in them on how to get things started for example that of the "registration" project. It is recommended to read those readme files before starting.

If there are questions, leave a comment. Thank you :)