Hi Mukesh, When i tried executing this code i am getting NoClassDefFoundError.....could you please assist me on this? using Selenium 2.53.1.
@Mukeshotwani6 жыл бұрын
Hi Dipika, You can run chrome now in Headless mode just add --headless in chromeoptions and you can run existing chrome in headless mode. Please refer below video kzbin.info/www/bejne/kGTYZ3icj7CHfK8
@dipikakarmakar84806 жыл бұрын
Thanks.... using ChromeOptions it is working fine
@anushachalana50086 жыл бұрын
Hi Mukesh, Can we use Headless browser testing to perform some actions ?? Like sign in and clicking on some button as we do in all. I think the answer is NO. But i want to do some action on web application without showing in GUI like it can perform on backend. Please suggest how to do it
@Mukeshotwani6 жыл бұрын
use ChromeOptions kzbin.info/www/bejne/kGTYZ3icj7CHfK8
@anushachalana50086 жыл бұрын
Thanks.. As a POC purpose, i have achieved what i want to perform. Thanks alot :)
@anushachalana50086 жыл бұрын
Thanks.. It worked :)
@shukrantpatel70244 жыл бұрын
i am facing below error for this video tutorial. Error: Exception in thread "main" java.lang.Error: Unresolved compilation problem: at htmlDriver.VerifyTitle.main(VerifyTitle.java:10) can u please tell me what will be the issue? i have tried with both TestNg and main method, but for both i am not able to run this 3 lines of code. i have added seperate htmlUnitDriver jar file in project lib. Please solve my query.
@Mukeshotwani4 жыл бұрын
Hi Shukrant, now you can use Chrome in headless mode learn-automation.com/how-to-run-selenium-test-in-headless-mode-in-chrome/
@shukrantpatel70244 жыл бұрын
@@Mukeshotwani This is now working for simple java program but not for TestNG program
@sharathchandrauppuluri7 жыл бұрын
Hello Sir, Isn't it possible to check logging into an application using headless browser? general coding procedure such as finding element by id or by xpath are failing with error "unable to locate the element". So is there any work around on this?
@Mukeshotwani7 жыл бұрын
Hi Sharath, I use headless browser for my project. You can follow below video kzbin.info/www/bejne/jorYqnyDmrxpnZY
@rajeev99876 жыл бұрын
HI Mukesh, How can I upload a file using PhantomJS or HtmlUnitDriver . Pls help
@dwipium6 жыл бұрын
Hi Mukesh, is current version of selenium jar did not contain package org.openqa.selenium.htmlunit.HtmlUnitDriver. as I was unable to see this in my imported jars. can u please suggest the workaround.
@shivam_methi6 жыл бұрын
same issue
@vikaspawar33956 жыл бұрын
hi mukesh, I always used to watch ur videos...it's really awesome...u almost clear every concept...but one request to u that can u plz increase the font size so that it will be clearly visible...otherwise thanks bro for giving such good videos for us.
@ravi28437 жыл бұрын
hello mukesh and thanks for sharing video with us.i have seen your all video but i have problem with javascript element locating or please could you give demonstration of how to handle javascript in webbrowse.
@vivekberlia85827 жыл бұрын
Hi. Thanks for the tutorial. Clicks and submit is not working with Selenium HTMLUnitDriver. I want to do webscrpping without opening browser. How to proceed?
@sachinjaiswal90546 жыл бұрын
Hello Techies, Following this video we have to have the server standalone JAR else we wont be able to import the suitable file. Don't get confused that if you are having selenium JAR files that would suffice. Standalone JARs are req for this. Keep automating :) Well explained Mukesh Also i had a question, upon running i'm getting this error FAILED: HTMLUnitdriver org.openqa.selenium.WebDriverException: java.lang.IllegalArgumentException: Cann ot locate declared field class org.apache.http.impl.client.HttpClientBuilder.ssl context
@huongnguyen-tc8of7 жыл бұрын
I have a problem. I can find element using Xpath with Firefox or Chrome browser. But when i use headless browser (HtmlUnitDriver), i miss error: NoSuchElement Unable to locate a node. Please help to check this issue. Tks
@Mukeshotwani7 жыл бұрын
Hi Huong, Can you try with PhantomJS it works fine for me . kzbin.info/www/bejne/jorYqnyDmrxpnZY
@huongnguyen-tc8of7 жыл бұрын
Hi @Mukesh: so no solution for HtmlUnitDriver to fix this issue?
@prachigoyal89755 жыл бұрын
Hi Mukesh, I was trying this simple code, but not getting output. Could you please suggest the reason for it ? public static void main(String[] args) { WebDriver driver = new HtmlUnitDriver(); driver.get("kzbin.info/www/bejne/bIPEdY2em717f5o"); System.out.println("Title is:" + driver.getTitle()); } Output I am getting : Title is:
@Mukeshotwani5 жыл бұрын
Hi Prachi, I would recommend you to use Chrome or Firefox browsers in Headless mode. learn-automation.com/how-to-run-selenium-test-in-headless-mode-in-chrome/
@veeraratna7 жыл бұрын
Hi Mukesh. Thanks for the video.But how can i confirm that www.facebook.com(Your example) working in all the browsers ? At the moment we are running suite seperately for all each browser
@blokesh237 жыл бұрын
Hi Mukesh .. its opening the browser ..but unable to locate element using xpath .. any help? thanks
@Mukeshotwani7 жыл бұрын
Try with PhantomJS
@vikaspawar33956 жыл бұрын
Hi mukesh, I have below code snippet for verifying title of page...its absolutely working fine and provides result as "Passed" when i use normal chrome driver...but as soon as i use headless driver like just using chromedriver along with chromeoptions then it always provides result as "Failed". I tried 4-5 times its giving the same....why is so?? please guide me...thank you public class HeadLessDriverDemo { public static void main(String[] args) throws Exception{ ChromeOptions options = new ChromeOptions(); options.addArguments("--headless"); System.setProperty("webdriver.chrome.driver","D:\\Selenium\\drivers\\chromedriver.exe"); WebDriver driver = new ChromeDriver(options); driver.get("www.facebook.com"); Thread.sleep(1000); String title = driver.getTitle(); if(title.equals("Facebook - log in or sign up")) { System.out.println("Passed"); } else { System.out.println("Failed"); } } }
@davidvasanthraj8 жыл бұрын
Hi Mukesh, I'm trying to this from my end but the "HtmlUnitDriver();" is not recoganized by eclipse I have imported the selenium jars to my project too. WebDriver driver = new HtmlUnitDriver(); Kindly assist
@Mukeshotwani8 жыл бұрын
Hey David in recent changes you need to add maven dependency to work with HTMLUnitDriver org.seleniumhq.selenium htmlunit-driver 2.21 In case you are using plain java project the download above jar > add into project > then try the same program.
@davidvasanthraj8 жыл бұрын
Thank you Mukesh, for your rapid response, your solution worked.. :)
@Mukeshotwani8 жыл бұрын
Cheers
@khadarbasha63714 жыл бұрын
Hi Mukesh...I need headless using ie.. can we do this?
@Mukeshotwani4 жыл бұрын
Hi Khadar as of now only chrome and Firefox works in headless mode not ie
@khadarbasha63714 жыл бұрын
@@Mukeshotwani but we can do it on Chrome why can't we do it on IE...
@anyonecanachieve7 жыл бұрын
hi Mukesh how to take screenshots in headless browser?
@Mukeshotwani7 жыл бұрын
+Vijaya Lakshmi kindly refer my phantojs video I have explained the same.
@udaybenake2067 жыл бұрын
Hi mukesh. Im not getting suggestion to import the HtmlUnitDriver Please do suggest
@shivam_methi6 жыл бұрын
same issue
@sabariraja57087 жыл бұрын
click event not work for div in htmlunitdriver but it work in chrome driver how to click a div in this htmlunitdriver
@Mukeshotwani7 жыл бұрын
Hi Raja use htmlunitdriver with Selenium 2.53.1 to fix this issue
@asmita44137 жыл бұрын
Hi Mukesh, first of all thank you for video Does HtmlUnitDriver support selenium 2.53.1? I am not able to find It
@asmita44137 жыл бұрын
Hi Mukesh, I have added htmlunit-driver-standalone-2.20.jar file in my project build path it's work.
@shyamananth9 жыл бұрын
Very Neat explanation.. Thanks a lot !!
@Mukeshotwani9 жыл бұрын
+Shyam Ananthakrishnan (ஷியாம்) Thanks Shyam check PhantomJS as well it supports screenshots as well.
@himanshukhare19924 жыл бұрын
Can anyone please share the link for HtmlUnitDriver Maven dependencies?
@Mukeshotwani4 жыл бұрын
Hey Himanshu now you can use Chrome or Firefox as well in headless mode learn-automation.com/how-to-run-selenium-test-in-headless-mode-in-chrome/
@himanshukhare19924 жыл бұрын
@@Mukeshotwani Thank you Sir :)
@arunx200420038 жыл бұрын
Hi mukesh. will i be able to capture screenshot in headless browser?
@Mukeshotwani8 жыл бұрын
Yes Arun for this you need PhantomJS. Check below video too kzbin.info/www/bejne/jorYqnyDmrxpnZY
@ishantsingh22357 жыл бұрын
how to use htmlunit driver with selenium 2.53..?
@Mukeshotwani7 жыл бұрын
Hi Ishant you can use Chrome now to work in HeadLess mode.
@MrJamil-in6rx8 жыл бұрын
Thanks for ur nice tutorial...
@Mukeshotwani8 жыл бұрын
+Jamiluddin Ahmed Thnk Ahmed
@rakeshghosh48678 жыл бұрын
Hi Mukesh, Your tutorials are really good, simple and helpful. Keep it up. Whatever I have learnt Selenium till now is because of you. So, I would like to Thank You for this. You are awesome...:) Coming to the 1st issue I faced while going through your tutorials. I am facing an issue while using HtmlUnitDriver with selenium server standalone 2.53.1. As this version doesn't have inbuilt HtmlUnitDriver(), I added HtmlUnitDriver jar 2.52.0. to my project. Adding this recognised HtmlUnitDriver(). But when I ran the program, I got below error- java.lang.NoClassDefFoundError:com/gargoylesoftware/htmlunit/WebWindowListener. I couldn't find any way to resolve it. At last, I used selenium server standalone 2.52.0 where there is inbuilt HtmlUnitDriver(). It worked fine. Could you please try and let me know if there is any way to fix this error while using selenium server standalone 2.53.1. Note - I used the code shown in this video only.
@omkomal20106 жыл бұрын
Hi Mukesh, Thanks for the videos, your videos really helped me to get a good job and do perform good in office. Can you kindly let me know how to download/upload file using headless Chrome, as I am using chrome in headless mode? Your inputs will be a great help! thanks