Desired Capabilities and Chrome Options in Selenium WebDriver

Поділитися
Вставка
  • Опубліковано 29 гру 2024

КОМЕНТАРІ • 150

  • @HYRTutorials
    @HYRTutorials  4 роки тому +3

    Please use the below link for the selenium videos playlist:
    🔗 bit.ly/2FyKvxj

    • @tufbro9708
      @tufbro9708 4 роки тому

      How to handle window authentication in chrome browser @H Y R

  • @kirandvn8953
    @kirandvn8953 3 роки тому +10

    It can't be better than this!!! Great explanation! Keep doing more for the testing community.

  • @ishagupta716
    @ishagupta716 3 роки тому +3

    I was not able to understand the difference between two and was getting confused to read on net.. And found this video. You explained so well. Thanks a lot .. You are superb ..

  • @MyGreatAchievers
    @MyGreatAchievers Рік тому +2

    UNDOUBTADLY, I WOULD SAY U R NO1 TRAINER IN TESTING

  • @chetanchoudhari9636
    @chetanchoudhari9636 4 роки тому +1

    Awesome Explanation where its covering all confusion that many internet blog explained

  • @tallurirahul5077
    @tallurirahul5077 2 роки тому +1

    Sir i am getting error when i gave Desiredcapabilities object 'caps' to chromedriver constructor at 7:33

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      What is the error buddy?
      Send me the screenshot on hyadagirireddytutorials@gmail.com

  • @a.yashwanth
    @a.yashwanth 4 роки тому +2

    I am new to java. Is ChromeDriver class in the "chrome" package which is in the "selenium" package? i.e, everything except the right end are packages?

    • @HYRTutorials
      @HYRTutorials  4 роки тому +1

      I didn't understand your question completely, could you elaborate it?

    • @a.yashwanth
      @a.yashwanth 4 роки тому +1

      @@HYRTutorials when I write java.util.Scanner are "java", "util" called packages and "Scanner" is called a class?

    • @HYRTutorials
      @HYRTutorials  4 роки тому +1

      Yes exactly.

  • @kalaigovindaraj8748
    @kalaigovindaraj8748 3 роки тому +1

    I have a doubt, while doing manual part.In chrome browser showing that plugins what are all you pinned but while doing automation it's does not shown why?.

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      In automation, a fresh instance of chrome browser will be opened.
      Which does not have any configuration or data that is set/stored manually.

  • @swapnabhaskaruni
    @swapnabhaskaruni 2 роки тому +1

    There is no video for handling tables in selenium playlist

    • @HYRTutorials
      @HYRTutorials  2 роки тому +1

      Tables are handled by using any dynamic locator like xpath or css selector.
      In selenium we don't have a seperate mechanism to handle the tables.
      We need to implement that logic by using the xpath or css selector.
      I personally prefer xpath for tables

  • @sweetypareek3077
    @sweetypareek3077 3 роки тому +1

    My project is working fine in eclipse but when I try to run on linux server it says [severe] bind failed cannot assign requested ip address (99)

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      I guess u need to check with your network team on this.

  • @m.pavankumarreddy7399
    @m.pavankumarreddy7399 2 роки тому +1

    If we want to maximize a browser window we can use driver.manage.window.maximize right then why to use capabilities class for maximize ?

    • @HYRTutorials
      @HYRTutorials  2 роки тому +2

      driver.manage.window.maximize will maximize the browser after opening the browser but using caps we can do that while opening itself.
      By your name I assume that you knew telugu language.
      So please watch this video for better understanding.
      ua-cam.com/video/POhpyNQeck8/v-deo.html

  • @madhucharan9810
    @madhucharan9810 Рік тому

    Which chrome option is used to avoid the timeout render

  • @swapnabhaskaruni
    @swapnabhaskaruni 2 роки тому +1

    Do you have a video that teaches how to use Desired Capabilities and chrome Options in selenium grid?

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      Desired capabilities or chromeoptions won't change for selenium grid but for grid we can provide extra arguments while creating the nodes

  • @vaibhavrevanwar8280
    @vaibhavrevanwar8280 2 роки тому +1

    I have read about this that with selenium 4 there are changes how desired capabilities work? but haven't fully understand it. Any good reference document or video suggestion to go through to understand it better with selenium 4 ?

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      There arent any particular changes in that area buddy. Selenium 4 has good support on chromedevtools protocol. May be you were confused with that.

  • @amrutagd
    @amrutagd 4 роки тому +1

    How to add same site by default cookies and Enable removing Same site= None cookies? What are keys to be added in option

    • @HYRTutorials
      @HYRTutorials  4 роки тому

      didn't catch your question, can u elaborate a bit

    • @amrutagd
      @amrutagd 4 роки тому

      @@HYRTutorials For my angular application I want to set 2 chrome flags mentioned above for Same Site cookies. I am not able to set the same using Chrome Option

  • @NguyenNhuHoan
    @NguyenNhuHoan 4 роки тому +2

    I have already logged into google chrome, now how to load the profile and still keep the login status. Please guide me

    • @HYRTutorials
      @HYRTutorials  4 роки тому

      Didn't catch you

    • @shyamsundersiraveni5178
      @shyamsundersiraveni5178 3 роки тому

      @@HYRTutorials Great explanation sir. I guess my question and above question seems similar and it is: How to open a Chrome as different user ? Could you please guide me to perform this .

  • @behondme9429
    @behondme9429 3 роки тому +1

    I am facing issue on Jenkins while using webdriver manager, facing "Session not created issue" but the same setup was Working fine on local eclipse

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      Do u have any proxy or permission issues in Jenkins machine?

    • @behondme9429
      @behondme9429 3 роки тому

      @@HYRTutorials Yes

    • @behondme9429
      @behondme9429 3 роки тому

      @@HYRTutorials Now facing different issue like driver version : unknown , " after xpath faced this" . driver version issue due to xpath?

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      @@behondme9429 full error please

  • @rd2674
    @rd2674 2 роки тому +1

    after login another browser is open and I want to click one button on that browser how do I handle this windows is same only URL name is change like first browser is logine when I login another URL dashboard is open and I a=want to click start button on this dashboard window

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      I have a video on how to handle window handles in this playlist buddy.
      If you watch that video then you will be able to get your solution

  • @pawanjoshi8132
    @pawanjoshi8132 3 роки тому +1

    I am facing an issue with permission based pop up !! I want to disable the pop up but it is not getting disabled !! Please help

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      watch this video:
      ua-cam.com/video/deKXbbIHD4w/v-deo.html

  • @travelkartvlog
    @travelkartvlog 2 роки тому +1

    Great content !!! Can’t think any better than this

  • @raghadraghad8433
    @raghadraghad8433 Рік тому

    Hi thanks for the video, I have a question:
    I am automating printing feature using selenium Java I have to deal with printing preview of chrome. I use chromeOptions to set some settings for printing like Save as PDF select landscape
    I have one question I need to change paper size to A4 instead of letter that is the default but I don’t know the attribute to set, do you have an idea or have the documentation for print_preview_sticky_settings.appState ?

    • @raghadraghad8433
      @raghadraghad8433 Рік тому

      I try:
      ChromeOptions chromeOptions = new ChromeOptions();
      chromeOptions.addArguments("--kiosk-printing");
      chromeOptions.setExperimentalOption("prefs", new java.util.HashMap() {{
      put("plugins.plugins_disabled", new String[]{"Chrome PDF Viewer"});
      put("printing.default_destination_selection_rules", "{\"kind\": \"local\", \"namePattern\": \"Save as PDF\"}");
      put("printing.print_preview_sticky_settings.appState", "{\"recentDestinations\": [{\"id\": \"Save as PDF\", \"origin\": \"local\", \"account\": \"\" }],\"version\":2,\"isHeaderFooterEnabled\": true,\"paperSize\": 'A4',\"isGcpPromoDismissed\":false,\"selectedDestinationId\":\"Save as PDF\"}");
      }});

    • @raghadraghad8433
      @raghadraghad8433 Рік тому

      Also I try media size parameter but not work also:
      put("printing.print_preview_sticky_settings.appState", "{"recentDestinations": [{"id": "Save as PDF", "origin": "local", "account": "" }],"version":2,"isGcpPromoDismissed":false,"selectedDestinationId":"Save as PDF","mediaSize": {"height_microns": 355600,"width_microns": 215900,"is_default":true}}");

  • @chakradhargollamudi5557
    @chakradhargollamudi5557 3 роки тому +1

    Hi sir,
    In chrome mobile browser how to enable popup redirects so that popup is not blocking to another page by using the capabilities

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      I haven't worked on mobile browser bro

    • @chakradhargollamudi5557
      @chakradhargollamudi5557 3 роки тому +1

      @@HYRTutorials
      Ok In web browser how to enable the popup and redirects to allow through selenium bro once check and let me know bro

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      By default, it allows all the popups and will not block anything.

    • @chakradhargollamudi5557
      @chakradhargollamudi5557 3 роки тому +1

      @@HYRTutorials
      Thanks bro All the best for ur channel bro

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      @@chakradhargollamudi5557 Thankyou bro

  • @Parthiv_Junior_Youtuber14
    @Parthiv_Junior_Youtuber14 3 роки тому +1

    Can we stop "save password" pop up when login with valid credential by using selenium automation? If yes then whats the code for that

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      Never tried that but take a look at the below link for all the chrome options:
      src.chromium.org/viewvc/chrome/trunk/src/chrome/common/chrome_switches.cc?pathrev=291251
      search for this one: // Prevents the save password bubble from being enabled.

  • @SaiRam-vr3sm
    @SaiRam-vr3sm Рік тому +1

    Hello sir, Is there a way to block specific js in selenium v3, if so can you please provide some explanation

  • @sweetypareek3077
    @sweetypareek3077 3 роки тому +1

    Hi Sir, I am working on a project and I want to use chrome-driver with web-driver-manager. I have installed chrome, so do I need to install chrome binaries or is that provided by web-driver-manager

    • @HYRTutorials
      @HYRTutorials  3 роки тому +1

      No need of chrome binaries.
      webdriver manager will download the driver files for you.

    • @sweetypareek3077
      @sweetypareek3077 3 роки тому +1

      @@HYRTutorials Thanks sir ..I had one more doubt ...should the chrome browser needs to be installed if I want to implement my project in "headless" mode?

    • @HYRTutorials
      @HYRTutorials  3 роки тому +1

      Yes it should be installed

  • @bigbosstwo4977
    @bigbosstwo4977 4 роки тому +1

    Hi Sir, could you please also explain how to run selenium scripts on an already opened chrome browser

    • @HYRTutorials
      @HYRTutorials  4 роки тому

      There are two scenarios:
      1. utilizing manually opened chrome browser
      2. utilizing chrome browser which is opened from selenium webdriver in the previous session.
      We cant perform the scenario 1 but you can perform the scenario 2.
      When u open any browser using automation, you will get the debug address of that browser.
      using that you can run your script in next run.

  • @vickydhangar9258
    @vickydhangar9258 27 днів тому

    Hello
    I am getting safe browsing alert when try to download xml file from web application.
    How can i enable safe browsing please help

  • @devendrapawar2425
    @devendrapawar2425 3 роки тому +1

    Well explained. Thank you.
    I just wanted to ask you that, how can we set desired capabilities to accept alert automatically.?

    • @HYRTutorials
      @HYRTutorials  3 роки тому +2

      Incase you are using the chrome browser, you can use the below code (use any one behavior from the below listed behaviors)
      ChromeOptions options = new ChromeOptions();
      options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.ACCEPT);
      options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.DISMISS);
      options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.IGNORE);

    • @HYRTutorials
      @HYRTutorials  3 роки тому +1

      Incase if you are only looking for the desired capabilities, follow the below code:
      DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
      desiredCapabilities.setCapability("unhandledPromptBehavior", "accept"); //accept,dismiss,ignore
      desiredCapabilities.setCapability("unexpectedAlertBehaviour", "accept"); //accept,dismiss,ignore

    • @devendrapawar2425
      @devendrapawar2425 3 роки тому +1

      Wow... It worked for me...thanks and lots of love 😍

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      @@devendrapawar2425 happy to help

  • @sk95661
    @sk95661 8 місяців тому

    Boss ...are you a IITian? of from which university u passed out?
    you are really sooo knowledgeble abt the technpologies

  • @swapnabhaskaruni
    @swapnabhaskaruni 2 роки тому +1

    how to take screenshots when there is an alert

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      In the same way how we take the page screenshots.

    • @swapnabhaskaruni
      @swapnabhaskaruni 2 роки тому +1

      @@HYRTutorials that didn’t work, I googled and came to know about Robot class. Only then I was able to take the screenshot when an alert is there.

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      Ohh thats good

  • @itsmepriyanka7359
    @itsmepriyanka7359 3 роки тому

    Hi my chrome picking from local setting and not from my path in webddiver..

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      By default chrome browser requires the driver executable to communicate wit the browser.
      so how is it opening the browser without using the driver exe?
      are you trying to open the chrome browser which is installed in some other location?

    • @itsmepriyanka7359
      @itsmepriyanka7359 3 роки тому +1

      @@HYRTutorials i mean to say it was showing wrong path in console.. Now it is fixed.. It was jar issue

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      Oh okay

  • @lal1981
    @lal1981 3 роки тому +1

    Chrome opens with data; and stuck any have an Idea?

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      Wat is the error that you are getting in console?

  • @shreedeevi2800
    @shreedeevi2800 2 роки тому +1

    Hi sir, can you tell how to execute first or last or specific n no. Of feature files.
    Like if I have 10 feature files and I want to execute 6 out of them. How can I do that

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      I'm assuming that you are talking about cucumber here.
      You can provide the tags for those feature files and execute only those tags or you can mention the feature file names in your testrunner file

    • @shreedeevi2800
      @shreedeevi2800 2 роки тому +1

      @@HYRTutorials we give tags for scenarios right. Can we also give tags for feature files. Can you paste sample code here

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      You can provide tag to the feature file also and it's exactly the same thing on how you do it for scenarios.
      Im writing this comment from my mobile so I don't have the sample code handy.
      It's easy only buddy. Just add the tag on top of feature keyword

    • @shreedeevi2800
      @shreedeevi2800 2 роки тому +1

      @@HYRTutorials ok thank you so much for your reply

    • @shreedeevi2800
      @shreedeevi2800 2 роки тому +1

      @@HYRTutorials and i need a small help. Can you share a sample demo project in which both cucumber and testng is used if give you my mail id. I want to know the structure which consists of both cucumber and testng. Ill be greatful to you if you provide one

  • @prashuvlgs
    @prashuvlgs 3 роки тому +1

    very neat explanation. Thanks

  • @ramsurya7351
    @ramsurya7351 2 роки тому

    Was very helpful! Thanks loads!

  • @tahakarim83
    @tahakarim83 3 роки тому +1

    Awesome jobs thank you so much you are life saver

  • @ShivrajHatte-y7m
    @ShivrajHatte-y7m Рік тому

    getting comile time excepyion as The constructor ChromeDruver(DesiredCapabilities) is undefined

  • @mohdshahrukh5164
    @mohdshahrukh5164 2 роки тому +1

    very well explained

  • @kreativedreams_
    @kreativedreams_ 4 роки тому +1

    great training approach

  • @socialmediahappy8697
    @socialmediahappy8697 3 роки тому +1

    osam expalation
    what about the
    option.mearge what it do

    • @HYRTutorials
      @HYRTutorials  3 роки тому

      If you have some desired capabilities created already and you want to merge those things also in the options class then you can use that merge method

  • @arfathkhan7797
    @arfathkhan7797 2 роки тому

    For me the programme is not running properly .

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      What is the error you are facing buddy?

  • @sweetthirty2
    @sweetthirty2 Рік тому

    Very very helpful🙏

  • @shalinikushwah4305
    @shalinikushwah4305 2 роки тому +1

    Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}], desiredCapabilities=Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}}]
    Getting this error .., anyone can help ?

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      Send me the full error details along with the screenshot on hyadagirireddytutorials@gmail.com

  • @tufbro9708
    @tufbro9708 4 роки тому +1

    How to handle window authentication in chrome browser @

    • @HYRTutorials
      @HYRTutorials  4 роки тому

      You can use either autoit or robot class or sikuli

  • @ankurbansal8128
    @ankurbansal8128 2 роки тому +1

    Well explained

  • @MrMeghesh
    @MrMeghesh 2 роки тому +1

    Could you please explain this in python selenium too

    • @HYRTutorials
      @HYRTutorials  2 роки тому +1

      As of now no plans for python buddy.
      But will see if I can make a playlist on that also.

    • @MrMeghesh
      @MrMeghesh 2 роки тому +1

      @@HYRTutorials okay...it will be very helpful for me 🙂

  • @Saadhya-p8o
    @Saadhya-p8o Рік тому +1

    caps is not wrorking for me

    • @HYRTutorials
      @HYRTutorials  Рік тому

      Which one buddy?
      You can focus on the options instead of caps

  • @maruthigowda8554
    @maruthigowda8554 Рік тому +1

    How to create maven project

  • @irfanms9975
    @irfanms9975 2 роки тому +1

    Chrome opens with "Data;" with selenium

    • @irfanms9975
      @irfanms9975 2 роки тому

      I'm getting this issue , please let me the solution if you have

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      Send me the screenshot on hyadagirireddytutorials@gmail.com

  • @allabouttestingwithashwini5046
    @allabouttestingwithashwini5046 2 роки тому

    Hi Sir, i have written the same script but in incognito it is showing unsecure page even after merging both objects.

    • @HYRTutorials
      @HYRTutorials  2 роки тому

      Can u send the screenshot on hyadagirireddytutorials@gmail.com

  • @viraeel
    @viraeel 2 роки тому +1

    Bro I need your help ....

  • @rajkamalm420
    @rajkamalm420 5 місяців тому

    Thank you

  • @KarnatiSumanth
    @KarnatiSumanth 4 роки тому +1

    HYR 👍

  • @tufbro9708
    @tufbro9708 4 роки тому +1

    How to handle window authentication in chrome browser @H Y R

    • @HYRTutorials
      @HYRTutorials  4 роки тому +1

      You can use any of the following:
      AutoIT
      Robot
      Sikuli

    • @tufbro9708
      @tufbro9708 4 роки тому +1

      Thank you @H Y R

    • @tufbro9708
      @tufbro9708 4 роки тому

      Hi bro ,one more query .when I sheduled a run in remote server.autoit and robot scripts are failed to execute.plz help me vaild solution

    • @HYRTutorials
      @HYRTutorials  4 роки тому

      U mean when u r running in parallel execution?

    • @tufbro9708
      @tufbro9708 4 роки тому +1

      No it's not parallel execution

  • @durgaprasad-ng8ez
    @durgaprasad-ng8ez 4 роки тому +1

    👍👌

  • @yeliza2350
    @yeliza2350 2 роки тому +1

    done