Hey good to see you after long time as busy schedule not able to check your channel but thanks for updating us buddy :)
@Mukeshotwani6 жыл бұрын
Thanks Amit Bhai.. Even I was busy so couldn’t update much videos😊
@dimplepodili11264 жыл бұрын
hi mukesh,i am not able to get the merge option for selenium 3 can u pls get me a solution. "The method merge(DesiredCapabilities) is undefined for the type ChromeOptions" and after adding selenium 3.6 jar files i am unable to get webdriver also it is coming like this "WebDriver cannot be resolved"
@SandeepKumar-xs4xh3 жыл бұрын
I tried this code & it's not working. I'm using selenium version 3.141. and tried with JUnit 5. (Sorry cannot disclose company URL or complete code, So copy-pasted code of the issue). Any solution.? Steps:- 1.Launch browser and enter the url. 2.Click on a link and new tab opens. 3.Navigate to new tab using WindowHandle concept. 4.Try to Allow access to Microphone in new tab as displayed in screenshot above.(Not Working). System.setProperty("webdriver.chrome.driver", "./drivers"+File.separator+"chromedriver.exe"); DesiredCapabilities cap = new DesiredCapabilities(); ChromeOptions options = new ChromeOptions(); //options.addArguments("--disable-notifications"); options.addArguments("start-maximised"); options.addArguments("--disable-infobars"); options.merge(cap); WebDriver driver = new ChromeDriver(options); System.out.println("Browser launched");
@syedalam47296 жыл бұрын
Hello Mukhes, I how conduct UI testing with selenium? Selenium is mostly used for functional testing. Thank You
@Mukeshotwani6 жыл бұрын
Hi Syed, Selenium is doing functional testing with UI only. API testing do functional testing without UI.
@saranyakarthik5 жыл бұрын
Hi, when I add an extension, a second tab opens in chrome which says abt the extension. My website opens in the first tab and ends up as error. how to avoid that? pls help
@syedalam47296 жыл бұрын
How to automate OTP in selenium. Each time I invoke the browser it asks me otp where the code is given via email. Please help. Thank You.
@Mukeshotwani6 жыл бұрын
Hi Syed Alam,OTP can not be automated in Selenium.
@praveenautomationinterview23676 жыл бұрын
Hi Mukesh, thanks for posting this...really very informative video how to find the location of chrome extensions?
@Mukeshotwani6 жыл бұрын
HI Praveen, you can download GetCRX extension. Then whichever extension you want to download right click and save.
@kowsalyakabi45625 жыл бұрын
HI Mukesh, can you please tell me the chromeoption to set the language to english?? options.addArguments("--lang=en-us"); I tried this, but it didn't work.
@Mukeshotwani5 жыл бұрын
Please share the complete code too.
@limbritadaikalam18475 жыл бұрын
what's the solution? Did you find it?
@syedalam47296 жыл бұрын
Hello Mukesh, I was asked a question regarding Jenkins when a job fails after start and I am not physically present how to resume that job?
@Mukeshotwani6 жыл бұрын
Hi Syed Alam, You can use cron pattern which will schedule the job automatically. Please refer below video for the same kzbin.info/www/bejne/aoG3iol_lqeHZ7M
@automateboringstuffwithraj4 жыл бұрын
How to continue code if the given element not found, bcoz its throwing error as of now
@Mukeshotwani4 жыл бұрын
Hi Rajinder, if element is not present then ideally test should fail but still you want to run the test then use try catch.kzbin.info/www/bejne/mZuxh39_d72im9U
@automateboringstuffwithraj4 жыл бұрын
@@Mukeshotwani Thank you sir
@sunkarimounika62296 жыл бұрын
Hello Mukesh,If Chrome browser is not installed in my machine.Can i run my program with headless chrome browser
@Mukeshotwani6 жыл бұрын
Yes Sunkari it will work but chromedriver has to be installed either in local machine or remote machine
@sarfrajansari17584 жыл бұрын
Hi mukesh,So I am trying to use selenium on a website it have 3step login process which quite heptic but if i use my browser it getting logged in automatically.Is there any process to open selenium driver with my profile or cookie of that login.
@Mukeshotwani4 жыл бұрын
Hey Sarfraj, try this kzbin.info/www/bejne/Y5irYX-ZjdVgiKc
@parthjangid35874 жыл бұрын
how to disable "chrome is being controlled by automated test software" ?
@Mukeshotwani4 жыл бұрын
Hey Parth, please try this code ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"}); WebDriver driver = new ChromeDriver(options);
@neetigoyal90754 жыл бұрын
hi Mukesh, is there any way to handle Single Sign on , eg.if i am logging in my application with my enterprise id (which i am passing for the first time login) and then under my application i clicked on some link which redirects me to new window which also accepts the same login credentials .So while validating manually it automatically takes my credentials , but when using Selenium it opens a new session asking for credentials.So is there any way to handle this by passing any setting to chrome driver?
@Mukeshotwani4 жыл бұрын
Hi Neeti, I have done same scenario in my org. When I open manually my application takes SSO and no login window present on web but when I run on VM then application ask for login details. This is the logic which I used. public void loginWindowPresent(String username, String password) { if(driver.findElements(By.xpath("here keep the username field or any field which comes on login window")).size()>0) { System.out.println("LOG:INFO- Login window present"); // write your code here to login } else { System.out.println("LOG:INFO- SSO Enabled Logged in using SSO"); } }
@Mukeshotwani4 жыл бұрын
Try this code and if you are still facing any issue then let me know.
@neetigoyal90754 жыл бұрын
@@Mukeshotwani sure will try and let you know
@neetigoyal90754 жыл бұрын
@@Mukeshotwani so just one thing here what i understood from code, if that login window is coming up again , we are providing the login credentials again .We are actually not bypassing SSO , we are just giving the alternate solution , to check if login window comes up again then enter the credentials again.Right?
@Mukeshotwani4 жыл бұрын
Yes true we are not bypassing we are handling login window. You need to identify whenever we get login section we can call the method which I mentioned above. Selenium does not have any option to bypass sso.
@subasthapa88955 жыл бұрын
How can I enable popups in robot framework using desired capabilities? Thanks in advance.
@火影-z9r4 жыл бұрын
hello sir how should i install it through node js to work in java script?
@Mukeshotwani4 жыл бұрын
Hi Mate, what is your requirement?
@selvamkandharaja34156 жыл бұрын
Hi Mukesh, Under what circumstances we need to set binary path? and why it is required?. Pls enlighten.
@sannasaravanan4964 жыл бұрын
Hi Mukesh, is it possible to modify headers using desired capabilities?
@Mukeshotwani4 жыл бұрын
Hi Sanna, you can use JSExecutor for setting headers.
@oindrilachakraborty83484 жыл бұрын
Hi Mukesh, "headless" argument option is not working for ChromeOptions class. Following is my code - WebDriverManager.chromedriver().setup(); ChromeOptions options = new ChromeOptions(); options.addArguments("--headless"); driver = new ChromeDriver(options); driver.get("www.google.com"); Thread.sleep(2000); WebElement txtSearchBox = driver.findElement(By.name("q")); txtSearchBox.sendKeys("Selenium Automation Testing"); txtSearchBox.sendKeys(Keys.ENTER); I have also tried using "options.setHeadless(true);". This also didn't work.Could you please provide a solution. Thanks in advance.
@Shivakumar-nl2li4 жыл бұрын
set window size other wise it wont work ChromeOptions options=new ChromeOptions(); options.addArguments("window-size=1400,800"); options.addArguments("headless");
@oindrilachakraborty83484 жыл бұрын
@@Shivakumar-nl2li It did work as it was in my code. No need to give window size. Previously the icon of chrome used to come in taskbar. Now it is not coming. That is why I thought it was not working. But it was.
@Mukeshotwani4 жыл бұрын
thanks Oindrila for confirming the same.
@selvamkandharaja34156 жыл бұрын
Hi Mukesh, Is FirefoxProfile similar to that of chromeoptions? Pls correct me if Iam wrong. Thanks in advance.
@Mukeshotwani6 жыл бұрын
Yes correct now for Firefox also has FirefoxOptions too
@selvamkandharaja34156 жыл бұрын
Thanks Mukesh😊
@akshayranjith6234 жыл бұрын
Can you post a video where we can use custom google chrome using selenium
@pavankumarg50916 жыл бұрын
Thanks Mukesh,Very informative video ..Can you please upload videos about how do we configure Maven Project to Jenkins ..Thanks in advance
@abcpandey134 жыл бұрын
Hi Mukesh, could you please help me with the code of opening chrome driver as a different user...?
@Mukeshotwani4 жыл бұрын
Hi Swati, please try below code // Create Object of ChromeOption Class ChromeOptions option = new ChromeOptions(); // add the path of which user you want to use option.addArguments("user-data-dri=C:\\Users\\Your path to user\\Roaming\\Google\\Chrome\\User Data"); // pass option object in ChromeDriver constructor WebDriver driver = new ChromeDriver(option);
@shyamsundersiraveni51783 жыл бұрын
@@Mukeshotwani Hi Mukesh, Could you please help me in launching the chrome with different user which is in different domain than the current logged in system domain.
@nikkibakshi65386 жыл бұрын
Hi Mukesh, can you tell me how to find the path for extensions downloaded for chrome. Thanks, Nikki
@Mukeshotwani6 жыл бұрын
Hi Nikki, I use this to download extensions of Chrome chrome.google.com/webstore/detail/get-crx/dijpllakibenlejkbajahncialkbdkjc
@liteteeskothammudu15513 жыл бұрын
Sir, do you know how to run chrome browser as different user in selenium?
@chhavichaudhary58744 жыл бұрын
Hi Mukesh, My script is downloading no. Of file but whenever the file is NOT pdf it's showing chrome related pop up "this file can harm your system... " I tried using the below code but nothing happening... Could you please check once if any updates required in below code:- Optn=webdriver.ChromeOptions() Optn. add_argument('--safebrowsing-disable-download-protection') Prefs={"download.default_directory":"c: ewdownloads", "download.prompt_for_download:False, " download.directory_upgrade": True} Optn.add_experimental_option("prefs", prefs) Driver= webdriver.chrome(chrome_options=opts) Thank you in advance!!
@27saranraj6 жыл бұрын
Hi bro , What is the use of adding chrome extension in browser, could please tell where we really use the extension in selenium web app automation
@Mukeshotwani6 жыл бұрын
Hi Saran, One example- If you need to do API testing using Restlet Client then you can use the same
@27saranraj6 жыл бұрын
Mukesh otwani thanks bro. . .i got it. . .
@umangsharma74475 жыл бұрын
@@Mukeshotwani - hey mukesh, i did not get this.. could you please elaborate whenever you get some time.. thank you !! :)
@sumanthzvakacharla60796 жыл бұрын
Thank you for updating us
@Mukeshotwani6 жыл бұрын
:) welcome mate
@MorningShine244 жыл бұрын
@Mukesh, Thanks for the video. I have a chrome plugin and after a page load say www.google.com, I need to click on that chrome extension icon. How do i click on that icon? Please clarify.
@KaliKofi4 жыл бұрын
Use pyautogui
@shaikhahmed22896 жыл бұрын
Mukesh, any classes on protractor
@Mukeshotwani6 жыл бұрын
not yet Shaik coming soon.
@abusiness87836 жыл бұрын
How do I disable images?
@ramyatippannavar88124 жыл бұрын
hi mukesh,i am unable to disable infobar and chrome some notification also.included chromeoptions class in code it is throwing error after running. this is error---- [RemoteTestNG] detected TestNG version 7.2.0 FAILED CONFIGURATION: @BeforeClass startup java.lang.NoSuchMethodError: org.openqa.selenium.chrome.ChromeOptions.addArguments([Ljava/lang/String;)Lorg/openqa/selenium/chrome/ChromeOptions; at com.pages.Pageclass.startapplicaction(Pageclass.java:17) at com.loginpage.BaseClass.startup(BaseClass.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:135) at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:64) at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:364) at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:318) at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:176) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:122) at java.util.ArrayList.forEach(Unknown Source) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:588) at org.testng.SuiteRunner.runTest(SuiteRunner.java:384) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
@Mukeshotwani4 жыл бұрын
Hi Ramya, which Selenium version you are using? This option is available after Selenium 3.6 and also please use TestNG version 6.9.10
@ramyatippannavar88124 жыл бұрын
@@Mukeshotwani hi mukesh....i am using testng 7.2.0 and selenium 3.4.0
@ramyatippannavar88124 жыл бұрын
@@Mukeshotwani selenium 3.141.59 using
@swapnilgujar63983 жыл бұрын
is it similar to profile?
@kmrajay2376 жыл бұрын
Nice One
@Mukeshotwani6 жыл бұрын
Thanks Mate
@neerajyadav-wt4cn4 жыл бұрын
Hi Mukesh, I tried the following code that I sent you but my infobars not working..means "--disable-infobars" with chrome options class. Kindly check the code.Thanks . public class Google { public static void main(String[] args) { //Also delete all the warnigs from chrome.. System.setProperty(ChromeDriverService.CHROME_DRIVER_SILENT_OUTPUT_PROPERTY, "true"); //System.setProperty("webdriver.firefox.marionette","C:\\Program Files\\geckodriver.exe"); //WebDriver driver = new FirefoxDriver(); System.setProperty("webdriver.chrome.driver", "C:\\Users\ eeraj_yadav\\Desktop\\chromedriver.exe"); WebDriver driver= new ChromeDriver(); ChromeOptions option = new ChromeOptions(); //option.addArguments("--disable-infobars"); option.addArguments("--disable-infobars"); driver.manage().window().maximize(); driver.manage().deleteAllCookies(); driver.get("www.google.com/"); driver.findElement(By.xpath("//input[@class='gLFyf gsfi']")).sendKeys("aaj tak");
@Shivakumar-nl2li4 жыл бұрын
as per new changes in Feb 2020 , it is not working .. pls check with new way below code options.setExperimentalOption("excludeSwitches",new String[]{"enable-automation"});
@Mukeshotwani4 жыл бұрын
Thanks Shiva for updates.
@mukeshgiri37235 жыл бұрын
how to handle "Access Denied" using selenium webDriver with java You don't have permission to access "@t" on this server. Reference #18.26eef873.1558255274.19e2e8b
@Mukeshotwani5 жыл бұрын
Hi Mukesh any example or url where I can find this?
@umangsharma74475 жыл бұрын
Hi Mukesh, i was just checking that disable infobar is now deprecated. We have to use another way to disable infobars. I came across below link with the alternative to disable infobar in chrome. help.applitools.com/hc/en-us/articles/360007189411--Chrome-is-being-controlled-by-automated-test-software-notification ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("excludeSwitches", new String[]{"enable-automation"}); WebDriver driver = new ChromeDriver(options);
@Mukeshotwani5 жыл бұрын
Thanks Umang, I will update in my next videos.
@umangsharma74475 жыл бұрын
@@Mukeshotwani your welcome Mukesh :)
@dimplepodili11264 жыл бұрын
hi mukesh,i am not able to get the merge option for selenium 3 can u pls get me a solution. "The method merge(DesiredCapabilities) is undefined for the type ChromeOptions" and after adding selenium 3.6 jar files i am unable to get webdriver also it is coming like this "WebDriver cannot be resolved"
@Mukeshotwani4 жыл бұрын
Hi Dimple, please use maven project and use Selenium 3.141.59 version which is stable. Which project are you using, is it plain java project or maven project?
@dimplepodili11264 жыл бұрын
@@Mukeshotwani thanks mukesh it is working with maven project
@mustuanju5 жыл бұрын
how to enable infobars then?
@Mukeshotwani5 жыл бұрын
Hi Mustafa by default infobar comes when you run your script