JavaScriptExecutor With Selenium WebDriver - Session 12

preview_player
Показать описание
Do something amazing and cool stuff with JavaScriptExecutor With Selenium WebDriver:

1. Highlight an Element
2. DrawBorder around an Element
3. Generate custom Alert during Test Execution
4. Click on an Element by using JaveScript
5. Refresh browser by using JavaScript
6. Get Title by using JavaScript
7. Get InnerText of page by using JavaScript
8. Scroll Into View and Scroll Page Down

Download this Libray from here:

========================================================

+Must have feature Highlight element Selenium for better execution.
In Automation, testing sometimes element highlighter plays very important role.

It helps us to track our execution flow which step is being processed. Some tools like QTP, Sahi etc. you will get this inbuilt feature.

For Selenium, we have to write small code, which simply highlights element based on our parameter values. let’s get started and see Highlight element Selenium using CSS values.

In Selenium, we can use JavascriptExecutor (interface) to execute Javascript code into webdriver.

--Refer this video - how to highlight an Element using JS:

========================================================
Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

-~-~~-~~~-~~-~-
========================================================
Please watch: "Selenium & Automation Interview Preparation - By Naveen AutomationLabs"
-~-~~-~~~-~~-~- Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Paid courses (Recorded) videos:
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
-------------------------------

✔️SOCIAL NETWORKS
--------------------------------

Support My Channel✔️Or Buy Me A Coffee
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة
Рекомендации по теме
Комментарии
Автор

Thank you for providing the reasoning behind JSE concepts. I always searched numerous JSE videos for finding answer to WHY! and finally found your tutorial as the puzzle solver. Thanks much Naveen. These are really helpful!

anglesloving
Автор

Really Helpful, Thank you so much . The way you explain I am really glad you exist on Youtube.

Mr_Raz_
Автор

Thank you very much Naveen for making this topic very easy. After watching your videos it feels very confident about particular topic. Keep it up☺

omkarpotdar
Автор

but nowadays some interviewers are asking syntax.
I don't know how a person can remember all the syntaxes.
I'm attending interviews nowadays, if interviewer is Indian lady, they always want proper syntax, correct method names, etc.
I was asked to write exact code for read data from excel, scroll down syntax, expect wait syntax etc
even for first written test they are asking java program with excel with syntax not pseudocode.
In real life we used to copy paste and edit, i don't know why they asking syntax like a teacher in school/college. who will mug up everything?

averageconsumer
Автор

good video..The way u explain the concepts really deserves a praise naveen

arjunraj
Автор

Hi sir, i wanted to know how to get the DOM of active webpage into java program. As if i am passing the url to java program it only gives the static DOM but not the DOM created after ajax.

chiragsingla
Автор

Thank you for the excellent tutorial I have a question about the drawn border. How to draw a border if the page has multiple buttons and any one of them button got failed?

anuragrajput
Автор

Hi Navin, I am not able to get title of the screen. I have written the same code as u have written in this video. Please help me out.

SunnyCool
Автор

Thank you, dear Naveen, you are Awesome Human Being.

engineerswfmcreation
Автор

hi naveen, i am having a issue. while i pass the value using javascript, it takes the value, but when it clicks on signin it says username cant be empty. please suggest. thanks

jaberahmedrana
Автор

Hey Naveen, why are we carrying "driver" in every method??
I think we can declare it as class variable so that we dont need to repeat that again and again

bihari
Автор

excellent tutorial. Thank you so much for sharing your knowledge.

jdhung
Автор

HI naveen, ,,your java script concept are very useful thank you very much

bahtiyarmuhsin
Автор

Hi naveen, please tell me why you're passing driver in every method and as well as while calling methods from the main() method...?

sumayazamasyed
Автор

can anyone help me whenever we writting JavaScript for hidden webelement OR for any query then why we are giving "arguement[0].click()" bcz if our hidden element will be in 2nd position then also it will work.

dhananjayprasad
Автор

i am executing to automate video with javascript but the play, mute, unmute, pause, ,all these are not working
using without flash driver.
and accesing 6 videos though msexcelbut the loop that is running is not able to find those javasript arguement,
guide me ..

meenuhembrom
Автор

Nice tutorial on JSExecutor with selenium, can you make one more video on how to handle some complex automation scenarios which is possible only with JSExecutor, which may not be possible usually with selenium library

sureshgarine
Автор

Hey Naveen,
In this same example, I have tried to take screenshot after the alert generation and it didn't get any screenshot. Is there any reason for this ?

ravivadlamudi
Автор

Hi Naveen

Your telegram link is expired. Could you please share a new link ?

adityaaggarwal
Автор

Hi Naveen, if i am using the border thing in my script then how i can identify the element that some bug is there and i have to make the border here

MrMadhur
join shbcf.ru