Excel VBA Introduction Part 57.4 - Finding Web Elements in Selenium

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ม.ค. 2025

ความคิดเห็น • 251

  • @bencole8301
    @bencole8301 3 ปีที่แล้ว +14

    I just finished re-watching this video to sharpen my VBA Selenium skills and it has helped me achieve nearly all of my goals from a project that I started on and off from about two years ago, and today I've nailed it 95% completed and just some tidying up of various untidy loops etc and committing it to a new Excel Workbook! My sense of achievement is sky high now and I literally could not have done this without your support Andrew. Thank you truly and now I'm off to watch the links you sent me regarding SQL!!! (-:

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +3

      Ahhh congrats Ben, that's amazing! Well done, enjoy that sense of satisfaction!

  • @rods6405
    @rods6405 3 ปีที่แล้ว +1

    Thanks for all these Selenium videos been trying various methods for loading into a excel sheet my youtube history and histroy comments for about 2 weeks, started watching your videos all done in 2 days thanks

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Excellent! Happy to hear the videos helped and thank you for taking the time to leave a comment!

  • @pauladams5239
    @pauladams5239 3 ปีที่แล้ว +2

    Most good TH-cam videos are a team effort. Your (royal) training videos are the most useful I have ever seen, by far. I'm happy to support your class. The class structure is logical, progressive, and ties it all together in the end. The redrafting and work you put into each lesson is clearly impressive.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thank you so much for the kind comments and the support Paul!

  • @mortimerconstant9248
    @mortimerconstant9248 2 ปีที่แล้ว +1

    Hello, Andrew.
    Great thanks for the quality of your videos and the time you spend to make them. More than useful, that help me a lot with VBA+Selenium, WebElements...
    I like your pedagogic way to teach, step by step, insisting on importants words. Your precise way of talking allow to me to understand easier your words, as i speak a foreign language. I hope you will keep up this incredible work.Regards.

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Thank you so much Mortimer! I'm really happy to hear that you're finding the videos useful and thank you for taking the time to write a comment!

  • @itsaustraliadayeveryday7234
    @itsaustraliadayeveryday7234 9 หลายเดือนก่อน +2

    So good to hear a soft and pleasnt voice to explain all of this in such detail.
    i could only but subscribe well done mate.

    • @WiseOwlTutorials
      @WiseOwlTutorials  9 หลายเดือนก่อน +1

      Ahh thanks! Happy to hear that you enjoyed it, thanks so much for the comment and for watching!

    • @itsaustraliadayeveryday7234
      @itsaustraliadayeveryday7234 9 หลายเดือนก่อน +1

      @@WiseOwlTutorials cheers

  • @bencole8301
    @bencole8301 3 ปีที่แล้ว +3

    Thank you Andrew. That may very well have been the most useful video yet for me. I am gaining in confidence on this subject so much each day and you are the source of my knowledge and enjoyment. I find myself looking forward to the next video no sooner than the previous one has finished. Thank you once again and please keep up the phenomenal work you do.

  • @guguo11
    @guguo11 3 ปีที่แล้ว +2

    Fantastic job Andrew! Thanks for your time to put together this informative video.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thanks so much! Happy to hear that you found it useful and thank you for taking the time to leave a comment!

  • @MyAudioBookCompilation
    @MyAudioBookCompilation 4 ปีที่แล้ว +3

    Really love this channel and of course our best teacher Mr. Andrew Gould.

  • @ashishbaliyan7776
    @ashishbaliyan7776 3 ปีที่แล้ว +1

    sir what a nice explanation of getting web elements . i am sure nobody can find anywhere best tutorial about this .

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thank you Ashish, I'm happy that you found it useful!

  • @Damned943
    @Damned943 3 ปีที่แล้ว +1

    I still push like and leave a comment because they say it helps YT algorithms understand what the world should see and value

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thank you! I appreciate you taking the time to do this, thanks for watching!

  • @this446
    @this446 4 ปีที่แล้ว +1

    You all rule! I am nothing but a huge fan!

  • @internationalpolitics1275
    @internationalpolitics1275 4 ปีที่แล้ว +2

    You are the best teacher forever love the way you explain Thank you very much

  • @kjesu2715
    @kjesu2715 3 ปีที่แล้ว +1

    Happy to watch your classes...

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Happy to hear that you're enjoying the videos, thanks for watching!

  • @dandanakan0
    @dandanakan0 2 ปีที่แล้ว +1

    Dear Andrew, utterly perfect, thank you very much.

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      You're very welcome Veysel, thanks for watching!

  • @krn14242
    @krn14242 4 ปีที่แล้ว +1

    Thanks Andy. Just learned that the ID is case sensitive. Set SearchInput = cd.FindElement(FindBy.ID("searchInput")) Set SearchInput = cd.FindElement(FindBy.ID("Searchinput"))

  • @tr911tr
    @tr911tr 3 ปีที่แล้ว +1

    excellent presentation, well documented. Great Work, keep going!!

  • @karnabudhathoki5311
    @karnabudhathoki5311 4 ปีที่แล้ว +2

    First viewer.... first commentator...I like wiseowl and Andrew Gould...

  • @Kamy333
    @Kamy333 ปีที่แล้ว +1

    Hi Andrew,
    I love your videos and awesome way of explaining.
    Unfortunately, I’m taking the course after 2 years and wiki page and there is no more id on search bar.
    So I’m trying to use the name = search or class=”cdx-text-input__input”
    And when I use sendkeys method I get an error “element not interactable”
    Would someone encounter the same issue? I am not sure if I’m doing anything wrong in my code !
    Thanks help is appreciated so I can follow the course

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      Indeed! It's one of the frustrating things about making videos on connecting to websites - websites change! I'm copying the answer I gave to the previous commenter on this video:
      Hi Alexandre! It appears that the design of the Wikipedia main page has changed since the video was recorded - it's the eternal problem with interacting with web pages! You can use other techniques to get to the search input box - here's some code that works for me:
      Sub NewWikipediaMainPage()
      Set cd = New Selenium.ChromeDriver

      cd.Start
      cd.Window.Maximize
      cd.Get "en.wikipedia.org/wiki/Main_Page"

      Dim SearchForm As Selenium.WebElement
      Set SearchForm = cd.FindElementById("searchform")

      Dim SearchInput As Selenium.WebElement
      Set SearchInput = SearchForm.FindElementByCss("input")
      SearchInput.SendKeys "vba"

      SearchForm.Submit

      End Sub
      I hope it helps!

    • @Kamy333
      @Kamy333 ปีที่แล้ว +1

      @@WiseOwlTutorials I just finished the tutorial and was not the only one I watched. Awesome. I have made a small donation. Sorry if it is not much. Competence should be rewarded and hope more people contribute.

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      @@Kamy333 It's very much appreciated, thank you!

  • @yeuduongtamhuong
    @yeuduongtamhuong 2 ปีที่แล้ว

    44:46 how to get date with location because format date is different in another country

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว +1

      The VBA Format function can't do this as far as I know. You can write the date into a cell in a worksheet, apply a locale-specific date format to it and then retrieve the text from the cell like so:
      Sub Locale_Formatted_Date()
      Dim FormattedDate As String

      Range("A1").Value = Date
      Range("A1").NumberFormat = "[$-fr-FR]MMMM dd"

      FormattedDate = Range("A1").Text

      Debug.Print FormattedDate

      End Sub
      Here's a list of locale codes
      docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a

  • @mayurchudasma8300
    @mayurchudasma8300 ปีที่แล้ว +1

    Very useful video .
    It will help us to develop some more skill

  • @markvalenzuela7010
    @markvalenzuela7010 3 ปีที่แล้ว +2

    Thank you so much for this tutorials! hope we have an episode on how to download and save files from web using Selenium

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      You're welcome, Mark! And yes, that topic is on the list!

  • @tg5441
    @tg5441 4 ปีที่แล้ว +1

    Thanks for the great video and appreciate your effort. I have learnt so much from it. You are indeed a great mentor

  • @janezklun
    @janezklun 3 ปีที่แล้ว +1

    The best channel there is, thank you

  • @frikduplessis8849
    @frikduplessis8849 3 ปีที่แล้ว +1

    Thank you Andrew for a great tutorial 👏👏👏👏

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      My pleasure Frik, happy to hear that you enjoyed it!

  • @sidharthpattanayak1066
    @sidharthpattanayak1066 4 ปีที่แล้ว +2

    Very nice video
    Sir please make a video for handling alerts of the websites

    • @WiseOwlTutorials
      @WiseOwlTutorials  4 ปีที่แล้ว

      Thanks Sidharth! That topic is on the list!

  • @Arunsharma-rv7lp
    @Arunsharma-rv7lp 3 ปีที่แล้ว +1

    Hello sir, My chrome Browser does not show me the indentation line. how could i enable it. I tried everything under dev tools but nothing happens.

  • @raja7442
    @raja7442 3 ปีที่แล้ว +1

    Hi could please tell me how to select drop down values in list

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Raja, there are lots of possible ways to do this depending on how the drop down list has been created. Here are just a few links you may find useful:
      stackoverflow.com/questions/52336222/unable-to-select-from-dropdown-in-webpage-using-selenium-vba
      stackoverflow.com/questions/54559497/unable-to-select-a-value-from-dropdown-in-webpage-using-selenium-vba
      stackoverflow.com/questions/40753383/web-driver-how-to-select-option-in-dynamic-drop-down-in-vba
      stackoverflow.com/questions/52228094/unable-to-select-from-dropdown-in-selenium-using-vba

  • @carloszerpazerpa2693
    @carloszerpazerpa2693 3 ปีที่แล้ว

    Buenas noches. Tengo un problema. Cuando inició con .Star habré Chrome pero luego se Cierra, que debo hacer

  • @Dsgagp
    @Dsgagp 2 ปีที่แล้ว

    I'm following your videos but I've no clue how to send info to a login user witch is in a table and then in a input type.. i've tried with the ID, witch is a unniq value but it says it doesn't exist. could you help ?

  • @tilakthedefiler
    @tilakthedefiler 2 ปีที่แล้ว +1

    Thanks for all this videos

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      You're welcome Robert, thanks for watching!

  • @ericksonlopez9169
    @ericksonlopez9169 2 ปีที่แล้ว

    How can i get the value inside a "data-original-title", i need it.

  • @qboss
    @qboss 2 ปีที่แล้ว

    Hi. I have a problem with basics. It just doesnt work like on your tutorial. For example you use .SendKeys "test" . But in my VBA doesnt work that form I have to use bracket like that: .SendKeys ("test") DO you know why? it might be diffrent version or what?

  • @Eric-gz1uw
    @Eric-gz1uw 3 ปีที่แล้ว

    Hi dear,I’m currently facing the issue which can’t print tag text due to it is displayed is false, and I also try to use attribute text but still failed, What should I do? Can you help me? I’m looking forward to your reply!

  • @김성진-p2o
    @김성진-p2o 3 ปีที่แล้ว +1

    it is lovely and fantastic information. Thank you.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      You're very welcome, thanks for watching!

  • @youssefsedkey7616
    @youssefsedkey7616 3 ปีที่แล้ว +1

    Great lesson..thanks Andy.

  • @rodrigoordenes4858
    @rodrigoordenes4858 ปีที่แล้ว

    Hi, I need to ask you another question. In this regard, I would like to consult the following:
    When multiple windows are opened in the browser, example 4 open windows.
    How can you open window number 3 directly? And
    How can you know the window that is open in the browser?
    Thanks again.

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      Hi Rodrigo! You might find video 57.6 in this playlist helpful th-cam.com/play/PLNIs-AWhQzcl3xKvF8sVL4sWRWICj_clM.html

  • @maxs364
    @maxs364 2 ปีที่แล้ว

    Hi!! I am trying login with user and pass, but macro don't find the element by name, xpath . Can You help me please?thanks

  • @phamngoctung4049
    @phamngoctung4049 2 ปีที่แล้ว

    Thanks for your Video. So I want to help a problem. How can I turn off "This type of file can harm your computer when I download XML file on website" Thank you

  • @yeuduongtamhuong
    @yeuduongtamhuong 3 ปีที่แล้ว

    how i get name of new frame( pop up windows) in html ?

  • @kartickchakraborty9135
    @kartickchakraborty9135 4 ปีที่แล้ว +1

    Please Sir, upload a complete video on VBA Regular Expression. I can't take it anymore from my Book. It's really hard to understand. I need your explanation on this topic.

  • @shailendrapandey4321
    @shailendrapandey4321 2 ปีที่แล้ว

    how to pass today's date in the search bar as .sendkeys only allow for string values

  • @dynamicmis7777
    @dynamicmis7777 3 ปีที่แล้ว

    How to download image from any website by selenium

  • @imranbhatti8580
    @imranbhatti8580 3 ปีที่แล้ว +1

    Hi, Andrew. This series is awesome for scrapping. I have a question: I am actually using a list of search terms lets say I entered "eye hospitals in Northern Ireland" and I got a lot of pages, what I want to then do is to navigate to the next page (if it exists) up to 10th page. I am stuck in finding the syntax for this for Selenium VBA. Help would be greatly appreciated

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Imran! It sounds similar to the techniques described in this video th-cam.com/video/_IlkdRwgIwg/w-d-xo.html
      It involves opening a new tab for each item in a list box until the entire list has been processed, I hope it helps!

    • @imranbhatti8580
      @imranbhatti8580 3 ปีที่แล้ว

      Thanks, Andrew, Let me be more clear. Let's say I have only one term "Eye Hospitals in Northern Ireland". I programmatically entered in it "google.com" and got it clicked. Now there is a huge number of search results pages as a google search. I am scrapping just from the metadata of those results. I have scrapped the first page and now want to navigate to the next page of the same search so that I can scrap it as I had done for page 1. Hope this makes sense

    • @imranbhatti8580
      @imranbhatti8580 3 ปีที่แล้ว

      And I want to scrap upto 10 pages of the google search results.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@imranbhatti8580 Hi Imran, yes that makes sense, the overall process you would use would be similar to the video I linked to above. But, instead of looping through the items in a drop list, you would be looping through the page number elements at the bottom of the list of results. This should be straightforward as the page numbers are held in tags within a so you can loop through the collection of elements in the usual way and then either click them or extract the href attribute and open a new tab with each one up to the 10th.
      I hope that helps!

    • @imranbhatti8580
      @imranbhatti8580 3 ปีที่แล้ว

      @@WiseOwlTutorials You are right. That is a table actually. I got it working this way "FindElementByXPath("//*[@id='xjs']/table/tbody/tr/td[" & intPages & "]").Click". However I still believe there would be a better way to get it done instead of Xpath.

  • @烟尘客
    @烟尘客 3 ปีที่แล้ว +1

    太有用了,谢谢您的讲解!

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      You are very welcome, thank you for watching!

  • @rodrigoordenes4858
    @rodrigoordenes4858 ปีที่แล้ว

    Hello again, I need to ask you another question. When I run selenium I get an error saying "class not registered". You will know how this problem can be solved. Thank you

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      Hi Rodrigo, I'm sorry but I haven't encountered that error although it seems that you're not the only one:
      github.com/florentbr/SeleniumBasic/issues/206
      stackoverflow.com/questions/62239548/vba-selenium-class-not-registered-80040154
      stackoverflow.com/questions/71471702/vba-class-not-registered-seleniumbasic-using-edgedriver-to-open-webpage
      stackoverflow.com/questions/70371312/connecting-edge-chrome-to-vba/70375655#70375655

  • @Omar-fe1cb
    @Omar-fe1cb 2 ปีที่แล้ว

    Is there a way to interact with an element that has no inspect tab when you right click in Google Chrome? I am trying to log in a page and paste the Username and password but Selenium won’t interact with the Google Chrome page. I get a pop window with username and password but I can’t interact with the Chrome page. I try to use VBA logic like “SendKeys”, “Keys.Tab” and “Keys.Enter” but they don’t work.

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Hi Omar, I'm sorry I don't know. It sounds like you've tried the sensible things.

  • @nellaimuthuvels7099
    @nellaimuthuvels7099 3 ปีที่แล้ว

    I have a div and inside that there are many img with src attribute..I need to get all those links..My code
    Dim imgs= driver.findelementsbytag("img")
    For each img in imgs
    Debug.print imgs(0).attribute("src")
    Next img.
    Can you please help me

  • @weisanpang7173
    @weisanpang7173 3 ปีที่แล้ว +1

    Hi Andrew,
    You have one of the best channels in explaining VBA. It seems the Selenium library requires an instance of the browser to be invoked, similar to the Internet Explorer VBA library, as opposed to the XML XTTP library. The Selenium library seems easy to follow, but is there an option where the scraping is done in the background instead of invoking a browser instance ?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thank you for the kind comments! Selenium was designed explicitly for the purpose of automating web browsers so there's no option to use it without a browser I'm afraid.

  • @lukereds9975
    @lukereds9975 3 ปีที่แล้ว +1

    Hi Andrew, i think i made a mistake deleting the previous message... anyway thank you, your answer was very correct!

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      No worries Luke, glad you got it working!

  • @matufer64
    @matufer64 3 ปีที่แล้ว

    it is possible to reactivate a previously created session? Thanks!

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Matias! I've seen example code to do this with other languages but not with VBA. Selenium is explicitly designed to work with a fresh browser each time so connecting to an existing browser is not a built-in feature.

  • @fireman87
    @fireman87 ปีที่แล้ว

    For the life of me I cant seem to get your tutorial to be able to find this link on a webpage, I have tried everything.

    • @fireman87
      @fireman87 ปีที่แล้ว

      Part Availability

  • @techsalesforce
    @techsalesforce 3 ปีที่แล้ว

    Hey is it possible to extract the entire html code in a web page to a string variable?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +2

      Hi! Yes, you can use the PageSource method of the Chrome driver:
      str = cd.PageSource
      I hope it helps!

  • @rodrigoordenes4858
    @rodrigoordenes4858 2 ปีที่แล้ว

    Hello, I would like to ask if you know how to make a screenshot with selenium ?
    Thank you.

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว +1

      Hi Rodrigo! Yes, here's a basic example:
      Option Explicit
      Private cd As Selenium.ChromeDriver
      Sub GetScreenShot()
      Set cd = New Selenium.ChromeDriver

      cd.Start
      cd.Get "www.wiseowl.co.uk"

      'Screenshot entire browser window
      cd.TakeScreenshot.SaveAs "C:\My Files\Image1.jpg"

      'Screenshot specific element
      cd.FindElementByCss("#cycler").TakeScreenshot.SaveAs "C:\My Files\Image2.jpg"

      End Sub

    • @rodrigoordenes4858
      @rodrigoordenes4858 2 ปีที่แล้ว +1

      @@WiseOwlTutorials Thank you very much for your response. You are a great help as always.

  • @peterwaynealjibe2165
    @peterwaynealjibe2165 3 ปีที่แล้ว

    Hi Andrew, thanks again for the amazing tutorial. Got question in finding elements by link text, is there a way to get the href if there are no title tag beside it?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Peter! I'm not quite sure what you mean, could you provide an example of what you're trying to do?

    • @peterwaynealjibe2165
      @peterwaynealjibe2165 3 ปีที่แล้ว

      Hi​@@WiseOwlTutorials , I'm trying to click into link but looks like there were no title tag beside the href.
      Wins/Losses Report

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      @@peterwaynealjibe2165 Hi Peter! You don't need the title attribute to find a link by text - you can use the text between the tags (in your case this is Wins/Losses Report). I hope that helps!

  • @jamesdean2906
    @jamesdean2906 3 ปีที่แล้ว

    I'm trying to locate an element but every option doesn't work, all I get is an error saying element not found. It had an

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi James, what happens if you try to get a reference to all the input elements using FindElementsByTag? How many input elements do you get? Can you loop through the collection and debug.print some properties of the individual items?

    • @jamesdean2906
      @jamesdean2906 3 ปีที่แล้ว

      @@WiseOwlTutorials after lots of research seems it's due to being an . When I right in the element in Firefox developer edition it gives me the option to switch frame yet in chrome when following your video and adding the .switchframe function nothing happens and the element even by .getelementsbyname doesnt't work. Of I manually click on the box I want to input data to I don't have the option to switch frame ? Any experiences getting elements from different ?

    • @jamesdean2906
      @jamesdean2906 3 ปีที่แล้ว

      @@WiseOwlTutorials the issue I had was the elements where in a different . So I've just navigated to that URL instead but now when i click the element for edit on the form a new window pops up with the data to edit and unsure how to reference that the cells in that as switch seems to not do anything

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@jamesdean2906 Hi James! Here's a basic example to give you the pattern you need:
      cd.Get "hcad.org/quick-search/"
      cd.SwitchToFrame cd.FindElementByCss("")
      cd.FindElementById("acct").SendKeys "92658211"
      cd.FindElementByCss("input[value='Search']").Click
      I hope it helps!

  • @oneBoredFish
    @oneBoredFish 2 ปีที่แล้ว

    Thank you very much! This has solved a huge problem I've been struggling with for weeks. I may have missed it but I don't think I saw a method of gaining control of an MS Edge browser window that was already open prior to executing any code, is that even possible? Thanks again!

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Hi Chris! Selenium doesn't support referencing an open browser - it's designed to start with a fresh browser each time. I'm not aware of any workaround for VBA, sorry!

    • @oneBoredFish
      @oneBoredFish 2 ปีที่แล้ว

      @@WiseOwlTutorials I understand. One more question if you don't mind. In VBA I could insert things into an input box with a command like:
      document.getElementByID("something").innerHTML = ""
      I have successfully converted most of my code to be compatible with SeleniumBasic but the command to actually change innerHTML elements (not just a plain text value) or to even insert new elements is something I cannot find. I can insert plain text but that is not what I'm trying to do. Is that covered in one of your videos somewhere? Thanks!

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      @@oneBoredFish Hi Chris! Sorry no I haven't covered that technique. Apparently Selenium doesn't have a direct way to do that but you can use Selenium to execute javascript to achieve the same thing stackoverflow.com/questions/35922259/modify-innerhtml-using-selenium
      I hope it helps!

  • @wanderbee8278
    @wanderbee8278 ปีที่แล้ว +1

    You are GREAT!!! Thank you :)

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      Ahh thanks, you're great too! Thanks for watching!

  • @koosschutter1675
    @koosschutter1675 3 ปีที่แล้ว

    Hi, great vid. What is the sendkeys for enter and ctrl etc?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thanks Koos! You can try the answer here stackoverflow.com/questions/36767433/press-enter-and-down-arrow-key-in-vba-selenium
      I hope it helps!

    • @koosschutter1675
      @koosschutter1675 3 ปีที่แล้ว

      @@WiseOwlTutorials It turns out enter would not work on the website anyway but I did not know about selenium wrapper so thank you very much. Another struggle was figuring out the hover dropdown (actions.movetoelement or something). Not a lot of help available that I can find.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@koosschutter1675 No problem Koos! I haven't done much with the actions part of Selenium yet but it's on the To Do list!

  • @Cosmicsciences
    @Cosmicsciences ปีที่แล้ว

    Hi sir i wanted to send automessage using microsoft teams apps but when i wanted to type message in chat the element of teams not working could you pleaee help me in this regard where i can send message but typing element i am not able to find(teams on web)

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว

      I think that you will struggle to do that with VBA. Teams has an API to make this sort of thing easier but again, VBA probably isn't the way to make use of it. learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=csharp

  • @sunilchoudhary6007
    @sunilchoudhary6007 3 ปีที่แล้ว

    sir how to click this close
    Close
    class="MuiTouchRipple-root"

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Sunil! I would look at the parts in this video which explain how to reference elements using the class name. I hope it helps!

  • @axelamoe
    @axelamoe 4 ปีที่แล้ว

    Thank you for the great videos as always, quick question. I am using EDGE to navigate to a website that has buttons on the site. The buttons usually are available after the page has loaded. I would like to do a loop until its present then click the button and do that as well on the next button click I like to get done. Any help? 1st button driver.FindElementByCss(".ToolbarExport.WidgetSet").Click then 2nd button driver.FindElementByXPath("//a[@title='PDF']").Click . Then 2nd button is dependent on clicking the first one. Thank you again

    • @axelamoe
      @axelamoe 4 ปีที่แล้ว

      I am having to do an application.wait between each line for it to work.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@axelamoe You could use the IsElementPresent function (it's mentioned in this video). You could use a Do Until loop to continue looping until the function returns true but you'll risk an endless loop if the element is never detected. I think you could also use the Timeout parameter of the FindElement methods (enter a time in milliseconds to give the method chance to find the element), something like this:
      driver.FindElementByCss(cssselector:=".ToolbarExport.WidgetSet", timeout:=1000).Click

    • @axelamoe
      @axelamoe 3 ปีที่แล้ว

      @@WiseOwlTutorials I have tried the iselementpresent but it did not work for me

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@axelamoe Can you share the URL of the page you're working with?

    • @axelamoe
      @axelamoe 3 ปีที่แล้ว

      @@WiseOwlTutorials can I email you? That would be better

  • @GT_755
    @GT_755 3 ปีที่แล้ว

    How do I check a checkbox from a website that has ag-selection-checkbox

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Ivan and Tara! You can apply the Click method to a checkbox to check it.
      I hope it helps!

    • @GT_755
      @GT_755 3 ปีที่แล้ว

      The class =“ag-selection-checkbox” is in a span so like and as you can imagine there are multiple for each checkbox so how do I tell vba to click a specific checkbox

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@GT_755 Hi Ivan, it's difficult to give precise advice without more information or access to the website you're using. You can try some of these suggestions
      stackoverflow.com/questions/61827666/xpath-selenium-vba-for-a-check-box
      stackoverflow.com/questions/52035940/how-to-click-on-checkbox-on-webpage-using-selenium-vba
      stackoverflow.com/questions/52782347/select-checkboxes-and-input-box-from-webpage-to-download-data

  • @satire6344
    @satire6344 2 ปีที่แล้ว

    how to fetch cookie under network tab from any website?

  • @rbrtsparkman
    @rbrtsparkman 3 ปีที่แล้ว +1

    Incredible tutorial. When will you ever make Python tutorials?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Thanks! My colleague, Andy, is working on a Python tutorial as we speak!

  • @user-ri7xy7gh2m
    @user-ri7xy7gh2m 2 ปีที่แล้ว

    Hello. Your training is excellent. How can we bring images with selenium in vba form?

  • @irynamusiiovska828
    @irynamusiiovska828 2 ปีที่แล้ว

    HI. I cannot open MS Edge in IEMode. Could somebody help. Please. Really needed.

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Hi Iryna! Sorry I don't know but perhaps these will point you in the right direction
      stackoverflow.com/questions/69479240/how-to-code-ms-edge-ie-mode-on-vba-using-seleniumbasic
      github.com/florentbr/SeleniumBasic/issues/229
      I hope it helps!

  • @mukeshexpo
    @mukeshexpo 3 ปีที่แล้ว

    I am regular watcher of all your video related to excel vba and whatever I have learned is due to your video tutorial. A ton thanks for such an informational video
    I have a query how we can handle the print document method from webpage, because when by using vba i click on the "Print" Button of a webpage, The vba got freezes until I closes the print window of the browser.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Mukesh, I'm happy to hear that you've been enjoying the videos, thank you for watching!
      I have the question of printing from a web browser on my list of videos to make but it may be some time before I get chance to create this one.

  • @peterkasonge7751
    @peterkasonge7751 3 ปีที่แล้ว

    bro I like this video. but i have a problem to use hyper links. if I inspect a button element it give me the following html code .please help me on how to work with this sort of reference. . there is nothing like input type , id or name. so please help.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Peter! The video shows several techniques you can use to do this, including using tag names, class names or link text. It depends on whether you're attempting to find all the hyperlinks or just a specific one.

  • @gilbertodesousacruz3851
    @gilbertodesousacruz3851 3 ปีที่แล้ว

    Hi How are you?
    Can you please give me an example of How to use the findElementById method with the Parameter raise as booleana = True
    Thanks for the classes

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      Hi Gilberto!
      I will admit that I've never needed to use the Raise parameter and I haven't looked into what actually does, sorry!

  • @joseph_anmar
    @joseph_anmar 2 ปีที่แล้ว

    Any idea about handing ngcontents ?

  • @hayachiharanin2727
    @hayachiharanin2727 3 ปีที่แล้ว

    Good Morning! Sorry for my bad English, I use the translator to communicate, your class was very interesting, I would like to know if it is possible to modify the html code of an element, I need to modify the value of an attribute on a static selection button, I searched all over the web until I find your video, I need to learn this. I use Selenium WebDriver for Chrome with Excel VBA. Thank you for your time!

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Good morning! I'm not sure of the answer to this! You can probably do it using the ExecuteScript method to execute some javascript but I don't know much about this. Here is an non-VBA example which might help to point you in the right direction, I hope it helps! stackoverflow.com/questions/8473024/selenium-can-i-set-any-of-the-attribute-value-of-a-webelement-in-selenium

    • @hayachiharanin2727
      @hayachiharanin2727 3 ปีที่แล้ว +1

      @@WiseOwlTutorials Thank you for taking the time to reply to my comment, I will review the content, thank you very much!

  • @AdamPearce-t4f
    @AdamPearce-t4f 3 ปีที่แล้ว

    Hello I am using obj.FindElementByName("somedropdown").AsSelect.SelectByPartialText (ThisWorkbook.Sheets("Sheet2").Cells(ct, c).Value) however getting error if it doesnt find an exact is it possible to use a select by partial text or contains for example?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Adam, did you see the last part of the video which uses the contains(text() functions with xpath? The example shown uses tags but the second answer here (not the accepted one) uses the same technique for selecting options stackoverflow.com/questions/29772075/selenium-select-selecting-dropdown-option-by-part-of-the-text
      I hope it helps!

    • @AdamPearce-t4f
      @AdamPearce-t4f 3 ปีที่แล้ว

      @@WiseOwlTutorials Great that has helped massively, I can now get the contains working with a fixed value for instance: obj.FindElementByXPath("//select[@name='countryid']/option[contains(text(),'CANAD')]").Click which find Canada and selects perfectly, but when I try to add a variable referencing a column in a worksheet with a list of countries it doesnt for instance: obj.FindElementByXPath("//select[@name='countryid']/option[contains(text(),'(ThisWorkbook.Sheets('Sheet2').Cells(ct, c)')]").Click

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@AdamPearce-t4f Hi Adam, you can't write the reference to the cell value directly into the XPath string, otherwise it's treated as the literal text you have typed in. You need to concatenate the reference to the cell to the string, something like this:
      obj.FindElementByXPath("//select[@name='countryid']/option[contains(text(),'" & ThisWorkbook.Sheets("Sheet2").Cells(ct, c) & "')]").Click
      I hope it helps!

  • @OlphinTR
    @OlphinTR 3 ปีที่แล้ว

    hi , i need some help for findelement. how can handle hidden elements. im working on excel selenium. i found some help but they re only js code and i cant run js code in c# (my target page use this codes "riTextBox riEnabled formText" "riTextBox riFocus formText" riTextBox riHover formText" , this codes chance with mouse places.
    Thx for video

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi, what do you mean by "handle"? What do you want to do with the hidden element?

    • @OlphinTR
      @OlphinTR 3 ปีที่แล้ว

      @@WiseOwlTutorials i try to do find element and sendkey but my workpage have hidden elements or i do not find element. I cant click or etc. Somewhere said "JavascriptExecutor" can do this but i cant use "JavascriptExecutor" or "executor.executeScript("arguments[0].click()"
      But i didnt.
      Thx for try to help 👍🏼

  • @prakashdutt1520
    @prakashdutt1520 2 ปีที่แล้ว

    How I can press enter using selenium in vba

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Hi Prakash, I've found Excel's Application.Sendkeys method the most reliable way to do this (it relies on the Chrome window being active)
      learn.microsoft.com/en-us/office/vba/api/excel.application.sendkeys
      I hope it helps!

  • @sidharthpattanayak1066
    @sidharthpattanayak1066 3 ปีที่แล้ว

    How I find background colour of a webelenent. Plz rply sir

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Sidharth, you can use the CSSValue method of an element to return CSS property values like this:
      Debug.Print MyElement.CssValue("background-color")

    • @sidharthpattanayak1066
      @sidharthpattanayak1066 3 ปีที่แล้ว +1

      @@WiseOwlTutorials Thank you so much sir

    • @sidharthpattanayak1066
      @sidharthpattanayak1066 3 ปีที่แล้ว

      Please upload more videos regarding use of ExecuteScript with examples.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@sidharthpattanayak1066 Hi Sidharth! You might be better off finding a javascript tutorial to get an idea of what's possible with ExecuteScript. I don't have a lot of experience with javascript.

  • @kabukijoe99
    @kabukijoe99 2 ปีที่แล้ว +1

    good lesson.

  • @KhalilYasser
    @KhalilYasser 4 ปีที่แล้ว +1

    Amazing and awesome. I hope you post less lengthy videos so as to be able to follow the videos better.

    • @WiseOwlTutorials
      @WiseOwlTutorials  4 ปีที่แล้ว +1

      Thanks Yasser, I didn't intend for this video to be quite so long! You can use the chapters listed in the description and on the play bar to quickly navigate to a particular section of the video which makes life easier. And there's a link to the completed code in the description so that you don't have to type everything I've done.
      Thanks for your support and comments!

    • @KhalilYasser
      @KhalilYasser 4 ปีที่แล้ว +1

      @@WiseOwlTutorials Thanks a lot my tutor for these amazing tutorials. I really enjoy watching your channel.

  • @youssefsedkey7616
    @youssefsedkey7616 3 ปีที่แล้ว

    Dear Andy, could you start a course on how to deal with windows applications through VBA?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi Youssef! Can you explain a little more what you mean by that? Do you have an example of the type of thing you want to do?

    • @youssefsedkey7616
      @youssefsedkey7616 3 ปีที่แล้ว

      @@WiseOwlTutorials Dear Andy thank you very much for quick response, what I mean is something like this:
      th-cam.com/video/QGky1TQLqeE/w-d-xo.html
      I need a lot to deal with different applications in a programmatic way, I liked this video, but it is very short, I want a full detailed explanation of how to use API.
      Thanks a lot, Andy.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      @@youssefsedkey7616 Hi Youssef, that's helpful thanks! I don't think that we'll be adding videos on that topic in the near future, sorry!

  • @umapitadadecasal1089
    @umapitadadecasal1089 2 ปีที่แล้ว

    Hi Thank you for you video.
    I’m trying to get the element, but it is a link. How can I get it? Could you help please ?
    The line in question is: class="sect" href="/a/tests/#groups">.
    Note that I need to get the element from href

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Hi Uma! There are several sections in this video which talk about how to extract links - you can check the list of contents in the video description. You can also see some other techniques for getting links in this video th-cam.com/video/y7yWL0oCB3k/w-d-xo.html
      I hope it helps!

  • @sidharthpattanayak1066
    @sidharthpattanayak1066 3 ปีที่แล้ว

    can not select an item in this combobox
    ex-Dim ele As SelectElement
    Set ele = ch.FindElementById("mat-select-0").AsSelect
    ele .SelectByText ("Odisha")
    html
     

  • @nhatminh1485
    @nhatminh1485 3 ปีที่แล้ว

    How finding element with a liv ""

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi there! Sorry but I don't understand the question. What do you mean by liv ""?

    • @nhatminh1485
      @nhatminh1485 3 ปีที่แล้ว

      @@WiseOwlTutorials hello administrator
      in the browser I find the following commands
      ul # menu li ul li a
      The vba code I write is as follows
      Set ResultSections = ch.FindElementById ("menu"). FindElementsByTag ("li") (2) .FindElementsByTag ("ul"). FindElementByTag ("li") (8)
      ResultSections.FindElementByTag ("a") Click
      Error 438 when running
      What is the reason for the error, add? thank you very much

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@nhatminh1485 Hi there! It's a little difficult to know exactly what's going wrong without knowing which page you're using but there are a few possibilities. Have you checked that the menu option is visible before you attempt to click it? You may need to click the menu first to make the list items visible. You may also need to wait for the list item to become visible before attempting to click it.
      I hope that helps!

  • @MasGesHusni
    @MasGesHusni 3 ปีที่แล้ว

    sir, please help me, i hard to findout the element type because there is no id,.. for an example like this :
    please help me to understand sir,
    thanks you very much from Indonesia

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      Hi there! The element always has a tag, in this case it is "input". The element also has multiple classes in its "class" attribute. We show multiple techniques for finding elements by tag or by class in the video. I hope it helps!

  • @marcoquaresma5956
    @marcoquaresma5956 3 ปีที่แล้ว +1

    👏👏👏👏👏

  • @narcisolassodelavega8191
    @narcisolassodelavega8191 2 ปีที่แล้ว

    Could you explain how it works CSS SELECT :not with examples? Thanks

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      I'll add it to the list, thanks for the question!

  • @bluxer4225
    @bluxer4225 3 ปีที่แล้ว

    !!!

  • @apchamon
    @apchamon ปีที่แล้ว

    Hi, Andrew!
    Thank you so much for the video!
    I'm having difficulty in inspecting element.
    On the webpage “en.wikipedia.org/wiki/Main_Page”, using the Inspect Element tool, I try to find the ID of the field “Search Wikipedia” and what appears highlighted is the following:
    Input Class = “cdx-text-input__input”
    I cannot find the ID “searchInput”.
    Could you help me?

    • @WiseOwlTutorials
      @WiseOwlTutorials  ปีที่แล้ว +1

      Hi Alexandre! It appears that the design of the Wikipedia main page has changed since the video was recorded - it's the eternal problem with interacting with web pages! You can use other techniques to get to the search input box - here's some code that works for me:
      Sub NewWikipediaMainPage()
      Set cd = New Selenium.ChromeDriver

      cd.Start
      cd.Window.Maximize
      cd.Get "en.wikipedia.org/wiki/Main_Page"

      Dim SearchForm As Selenium.WebElement
      Set SearchForm = cd.FindElementById("searchform")

      Dim SearchInput As Selenium.WebElement
      Set SearchInput = SearchForm.FindElementByCss("input")
      SearchInput.SendKeys "vba"

      SearchForm.Submit

      End Sub

    • @배인수-i8x
      @배인수-i8x ปีที่แล้ว

      @@WiseOwlTutorials Thanks guys. I had the same problem with new "#p-search" id which caused findelement (byid, byclass, bycss all the same error) error. The code above (SearchForm and SearchInput combo) worked for me! But now I realize I do not know how to find out the alternative solution like this.
      Maybe I can try to write down all the css inside of target block and its children, do trial and error with all possible combinations...which I am not sure of finding any shorcut.

  • @Jwichern01
    @Jwichern01 3 ปีที่แล้ว

    Fantastic video! I am really enjoying this series. One question I have is that when you extract a href link and print it to the immediate window it shows the full address but for me it just shows the additional address text. For example your address returns "en.wikipedia.org/wiki/September_21", yet mine returns "/wiki/September_21". How do I return the full path?

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      Hi John, you can use the baseUrl property of the ChromeDriver object to get the first part of the link
      Debug.Print cd.baseUrl
      I hope it helps!

  • @sml8026
    @sml8026 2 ปีที่แล้ว +1

    As many have stated, excellent and enjoyable presentation.
    Although I did watch the whole video, in my ongoing project I was unable to figure out how use those techniques to grab a value I needed.
    If not too much trouble, please direct me on how to locate the value 5.512
    .....
    Cutting edge diameter (m7)
    ....
    5.512
    Any help is greatly appreciated. Sincere thanks. Cheers.
    PS
    Answer recently found that has worked so far.
    Set locfound = ch.FindElement(FindBy.XPath("//*[text()='Cutting edge length']")
    Set loc = ch.FindElementByCss("#wag-product-code-search > div.col-sm-12 > div.col-lg-12.no-padding-sm.no-padding-xs.ng-star-inserted > div.wag- tab-content.no-small-padding.col-sm-12.ng-star-inserted > div.col-lg-12.clearfix > div.no-small-padding.col-xs-12.col-lg-8.product-details-data.ng-star-inserted > table > tbody > tr:nth-child(3) > td.value > span.value")
    Quite a long css selector but it did find that element and return value housed within span.

    • @WiseOwlTutorials
      @WiseOwlTutorials  2 ปีที่แล้ว

      Thanks, happy to see that you found a solution!

  • @gauravjain5159
    @gauravjain5159 3 ปีที่แล้ว

    Hello Andrew, Good Morning!! Once again i am here with another problem :) After login in to the website, the logout button is listed under a li element and its not visible. I can able to find the element for logout, but when I use Click event, it is throwing a run time error '11' : ElementNotVisibleError. Is there any way to make the element visible ?
    MyBrowser.FindElementById("js-user-dropdown").FindElementsByTag("li")(15).Click
    I also tried using submit, however as this element is not a part of form hence submit is also not working.

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว +1

      Hi Gaurav! Have you tried clicking the dropdown element first to make the Logout button visible and then clicking the Logout button? You may need to add a short wait between those two actions. Let me know if it works!

    • @gauravjain5159
      @gauravjain5159 3 ปีที่แล้ว +1

      Hi Andrew, thanks once again. It worked as expected. :)

    • @WiseOwlTutorials
      @WiseOwlTutorials  3 ปีที่แล้ว

      @@gauravjain5159 Awesome! Thanks for taking the time to let me know!

    • @gauravjain5159
      @gauravjain5159 3 ปีที่แล้ว

      Andrew sorry, it works when page is completely open. However if the size of the page is smaller it throws a runtime error 0, Element Click Intercepted: Element is not clickable at point (888, 615). So I was thinking,
      1. Is it possible to adjust the size of the page ?
      2. Is it possible to make Chrome invisible ?

    • @gauravjain5159
      @gauravjain5159 3 ปีที่แล้ว +1

      Hello Andrew, Just an update I tried Window Maximize property and the code worked perfectly fine now :) Thanks again for your anticipation