Execute JavaScript in selenium to perform operations on HTML elements

sel_jsNow we know how to identify html elements using only selenium or execute javascript in selenium,

Now let’s see how we can perform actions on different web elements like

textbox – how we can enter text
Button – click
How to get attribute of a html element…

For input buttons

For textbox


For Radiobuttons



For CheckBoxes
Working with CheckBoxes is same as Radiobuttons, just one difference, we can check multiple options in checkboxes,
[Try yourself and let me know if get any issues]

Content posted is based on learning or working experience, please leave comments if anything needs to be added or updated, discuss your queries on our facebook:qavalidation.com, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: