Hi Naveen, Thank you! Pasting code below for future viewers. public static void flash(WebElement element,WebDriver driver) { JavascriptExecutor js=(JavascriptExecutor)driver; String bgcolor = element.getCssValue("backgroundcolor"); for(int i=0; i
@viveksalgaonkar10053 жыл бұрын
Hey Naveen, your teaching is excellent you make it so easy to understand. Really appreciate it.
@omkarpotdar27632 жыл бұрын
Good job Naveen, this session really help me to understand the concept of JavaScriptExecutor. Thank you so very much.
@sakshiaggarwal61996 ай бұрын
Thank you so much Naveen!!🙏🙏
@karthikkumaresan10912 жыл бұрын
nice video to understand this concept. Thank yu
@kalyanijoshi68845 жыл бұрын
How do we implement this in framework? for each and every element i have to add this or is there any better option?
@humasheikh89117 ай бұрын
Hi Naveen,Please explain why driver is passed in parameter for JavascriptExecutor
@purushothammb90966 жыл бұрын
Hi Naveen, How to capture the screenshot with the element highlighted state? I want to add it my extent report , I've implemented this in my code , my code is highlighting the WebElement but in the screenshot I don't see the WebElement with highlighted state. How to achieve this with the code ? Please suggest me. Thanks.
@sagarpateldon2 жыл бұрын
if someone is not able to see Highlight elements or flashing element .you can give some wait time between changing color like this --------> public static void flash(WebElement element, WebDriver driver) throws InterruptedException { String bgcolor = element.getCssValue("backgroundColor"); for (int i = 0; i
@Ashishbains256 жыл бұрын
Worked fine for me. Thanks :)
@swatidubey46696 жыл бұрын
Hi Naveen , are these 65 tutorials in this playlist are sufficient to crack any selenium interview ?
@sarojjha92434 жыл бұрын
Yes it is
@testautomation61003 жыл бұрын
Hi Naveen, A quik quation i have. I am unable to find the executescrip() method in my eclipse may there is no jar file available for this class or something else I unable to understand could you please assist.? thank you
@PreetiGupta-qz1nw5 жыл бұрын
Hi Naveen, Your videos are so amazing. Its easy to understand..Excellent work.
@naveenautomationlabs5 жыл бұрын
Thanks for watching it @Preeti Gupta.
@Bhavi5852 жыл бұрын
Can we achieve this by using specific XPath for multiple fields at a time and the qmetry report also shows the highlighting those fields
@LittleTanish2 жыл бұрын
Hello, I have highlight elements method but I need to use this method using listeners in selenium 4. I tried use driver.register(highlight) method but this is not working in selenium 4
@mayursapre6986 жыл бұрын
Hi Naveen, At 8.08min You mention Javascriptexecutor as Class but its Interface
@kanikagupta85342 жыл бұрын
Hi Naveen, I am using eclipse and I am not being able to perform executeScript(). I am getting the error below. The method executeScript(String, WebElement) is undefined for the type JavaScriptExecutor. Can you please help me out with it?
@AnuragVerma296 жыл бұрын
Hi Naveen, In my eclipse I am not able to use executescript(). What could be an issue ? should I need to download any jar file ?
@reddy41433 жыл бұрын
No It will be word and please share the code to. My what's number 6303698052
@AnuragVerma293 жыл бұрын
@@reddy4143 Thanks brother, but that problem I faced 2 years ago, but again thanks for your concern.
@andreidiachenko57083 жыл бұрын
BRAVO
@ruchi2105 жыл бұрын
Naveen can you please start online classes.. want to join some regular online class
@reddy41433 жыл бұрын
Thank you sir
@reddy41433 жыл бұрын
I got job mostly your Jenkin video impressed
@skjahangir38003 жыл бұрын
Can you please make a video of scrolling and performing some action like checking the check boxes randomly Thank you
@fahimbaig12 жыл бұрын
Pasting the below code WebElement continueBtn = driver.findElement(By.id("continue")); flash(continueBtn, driver); public static void flash(WebElement element, WebDriver driver) { JavascriptExecutor js = (JavascriptExecutor) driver; String bgcolor = element.getCssValue("backgroundColor"); for (int i=0; i
@bashaneerati4 жыл бұрын
Hi Naveen! .. is the any another Syntax for Jsexecutor... In your point of view it is very complex.... Can u provide less syntax code for jsExecutor
@ManjunathPrabhakar4 жыл бұрын
This is one of the easiest way!
@SherineVishal4 жыл бұрын
Like all your videos. Thanks for sharing. One thing, do we need JavascriptExecutor object in flash class
@ManjunathPrabhakar4 жыл бұрын
In this video flash is a method. And as per usage here JS exec is unused in flash method, hence not needed within flash. But in other method JS exec is needed since we are using css styling to applying bg color.
@aspp81374 жыл бұрын
Hi Naveen,I am getting the error Exception in thread "main" java.lang.ClassCastException: org.openqa.selenium.chrome.ChromeDriver cannot be cast to seleniumSessions.javascriptExecutor at seleniumSessions.javascriptExecutor.flash(javascriptExecutor.java:37) at seleniumSessions.javascriptExecutor.main(javascriptExecutor.java:27) executeScript it is giving an error.how do i proceeed further to see highlight
@venmathir87512 жыл бұрын
Same for me. Did U find any solution
@rushikeshkhandave20115 жыл бұрын
Hi how can we highlight list of web element using this
@kushagrapandey36713 жыл бұрын
JavascripExecutor is a class or interface?
@rajendrakumarnayak51033 жыл бұрын
Hi Naveen Sir, I've following your videos and have understood the code well, I tried the above code on a sample website and it shows an exception error: Exception in thread "main" org.openqa.selenium.JavascriptException: javascript error: argument is not defined for the method - flash(loginBtn, driver); Kindly please help me understand where does it actually gets stuck. Regards, Rajendra.
@anumarwaha2010 Жыл бұрын
I am also stuck at same the point . Kindly provide solution
@ravinderjill99616 жыл бұрын
HI naveen how do i upload image and take screen shot
@Linga-yp1bw5 жыл бұрын
For Uploading File We Need to use autoit and take screenshots we have method take screenshot mehod
@fathimasyed42324 жыл бұрын
How to capture the color while move over an element...i tried with action class .. but it comes out ..let me know if anyone know and done successfully...
@itindranil4 жыл бұрын
JavaScriptExecutor is a class or Interface ?
@ManjunathPrabhakar4 жыл бұрын
Interface. Look at this www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/JavascriptExecutor.html
@madhusmitasahoo10615 жыл бұрын
Hi Naveen, thanks for the video. I am getting error as rgb(int, int, int) is not defined. Can you help? Thanks
@desifoodie83714 жыл бұрын
Please put inside quotation as shown
@ParasJoshiPj5 жыл бұрын
Hi naveen please one make video on CI CD with live example...how we can do ci cd if developer will give the new cr build for this free crm website then how i will run these script automatically.
@sabbirahamed189410 ай бұрын
How this highlight help the test or quality ? These are for new selenium users. In the real-life most important is your detailed and effective testcase. Because each additional line of coding will take time from your testing end. So, learn this but avoid using it for real-life.
@naveenautomationlabs10 ай бұрын
Its not like this, you can always create a generic function and call this function in the basis of the feature flag true or false. This is useful when you want to highlight the element during the execution while giving demo or debugging. If you don't want to use , make the feature flag false. In framework it's not about test or quality, it's about adding some out of the box features to decorate the framework to understand the debugging and execution properly.
@sabbirahamed855410 ай бұрын
Naveen , I luv to watch ur videos., It's nothing related ur quality. But where you will use it in real life for what. As u know in real life we dont do show boat. In framework u have to add it as global from ur common methods, so it will run the method for all the testcases. It will add time for test running time and also it will increase testcase run failure rate. As u know selenium open source. Because it is not a part of test or it will not help u for quality. It will only help the click part for display (not the whole coverage)and we dont really need that. For display , we have limitation in selenium as u know. We can only make sure HTML & CSS and javascripts. Rest r not selenium , just java....because I m using java
@techxpert74034 жыл бұрын
I want to implement this in robot framework , please share the detailed step
Yes. Culprit is thread.Sleep(). It's fine for debugging. However in actual production there are workaround to avoid it.
@Sifat1441 Жыл бұрын
Hi Navin, JavascriptExecutor is not a class. It's an interface
@niteshrawat5766 жыл бұрын
Hi Naveen, hope you are good. Will executing the script i am having an exception which says"undefined argument". I have carefully check all the code and make sure all arguments (element ,driver,color) are properly defined. Cam you please help me out with this issue. You can share me your email if you wanna review the code. Thanks in advance!!
@chandrahasdhandeti88986 жыл бұрын
javascriptexecutor is a interface right
@sandeepredhu20356 жыл бұрын
Its a class
@RohitShinde-xh7vo5 жыл бұрын
@@sandeepredhu2035 Its an interface
@ankitsrivastava11266 жыл бұрын
Hi Naveen my question is if our Application does not designed form Java Script then will JS Executor work, i think not. please answer ....
@naveenautomationlabs6 жыл бұрын
It will work.
@aryanroy90785 жыл бұрын
Hi, can you please guide me to find or make xpath in ie11 for execute script in selenium
@deepakpatil23975 жыл бұрын
please refer the below link to highlight the any element. www.softwaretestingmaterial.com/highlight-element-using-selenium/
@shwetachoudhary13143 жыл бұрын
javascriptexecutor is an interface and not a class, right?
@yahankc0073 жыл бұрын
Right
@megalashanmu21775 жыл бұрын
I am unable to implement The method executeScript, unable to pass the webelement in this. It says executeScript.(String, Object[]) in the type JavascriptExecutor is not applicable for the arguments (String, WebElement) can u help me ??
@JAYITAMs5 жыл бұрын
try this without creating method WebElement loginButton = driver.findElement(By.xpath("//input[@type='submit']")); JavascriptExecutor js = (JavascriptExecutor) driver; //Here i pass values based on css style. Yellow background color with solid red color border. js.executeScript("arguments[0].setAttribute('style', 'background: green; border: 2px solid yellow;');", loginButton);
@davidvilla51547 жыл бұрын
hI Naveen, This Pop up still interrupting to my code. not typing log in and password...
@naveenautomationlabs7 жыл бұрын
try to click on that login button using javascriptexecutor.
@naveenautomationlabs7 жыл бұрын
use this code to click on login button: JavascriptExecutor js = (JavascriptExecutor)driver; js.executeScript("arguments[0].click();", driver.findElement(By.xpath("//input[@type='submit']")));
@parvesahammed33535 жыл бұрын
@@naveenautomationlabs tnx
@kalyanijoshi68845 жыл бұрын
Please share the code
@prashantmahajantanashah Жыл бұрын
I got the following error. The browser opened but it was not able to highlight and threw the error as below: Exception in thread "main" java.lang.ClassCastException: class org.openqa.selenium.chrome.ChromeDriver cannot be cast to class org.htmlunit.javascript.background.JavaScriptExecutor (org.openqa.selenium.chrome.ChromeDriver and org.htmlunit.javascript.background.JavaScriptExecutor are in unnamed module of loader 'app')
@prashantmahajantanashah Жыл бұрын
Used below methods:- public static void flash(WebElement element, WebDriver driver) { JavaScriptExecutor js = (JavaScriptExecutor)driver; String bgcolor=element.getCssValue("backgroundColor"); for(int i=0;i