DOM not refreshing with Selenium (IE, Chrome and VBA)How to tell if a DOM element is visible in the current viewport?How to find event listeners on a DOM node when debugging or from the JavaScript code?How do I find out which DOM element has the focus?Remove all child elements of a DOM node in JavaScriptHow to Implement DOM Data Binding in JavaScriptHow to return DOM from Selenium after clickHow to initiate click before page is fully loadedCan a website detect when you are using selenium with chromedriver?How to get updated html data without refreshing the page seleniumWeb element not identified by selenium

Should I have one hand on the throttle during engine ignition?

Inscriptio Labyrinthica

Does 5e follow the Primary Source rule?

How did J. J. Thomson establish the particle nature of the electron?

Why aren't there any women super GMs?

Proof that every field is perfect???

I have found a mistake on someone's code published online: what is the protocol?

Which GPUs to get for Mathematical Optimization (if any)?

Connection between SM an CM

Who would use the word "manky"?

Is it legal for a supermarket to refuse to sell an adult beer if an adult with them doesn’t have their ID?

Apex Legends stuck at 60 FPS (G-Sync 144hz monitor)

🍩🔔🔥Scrambled emoji tale⚛️🎶🛒 #2️⃣

Don't individual signal sources affect each other when using a summing amplifier?

How would you say "Sorry, that was a mistake on my part"?

Do higher dimensions have axes?

How important are the Author's mood and feelings for writing a story?

Why are flying carpets banned while flying brooms are not?

Data visualisation: Pie charts with really small values

Probability that the price of stock following a brownian motion goes under a certain value

Is encryption still applied if you ignore the SSL certificate warning for self-signed certs?

Is it possible to have a career in SciComp without contributing to arms research?

Did Hitler say this quote about homeschooling?

Diagram of Methods to Solve Differential Equations



DOM not refreshing with Selenium (IE, Chrome and VBA)


How to tell if a DOM element is visible in the current viewport?How to find event listeners on a DOM node when debugging or from the JavaScript code?How do I find out which DOM element has the focus?Remove all child elements of a DOM node in JavaScriptHow to Implement DOM Data Binding in JavaScriptHow to return DOM from Selenium after clickHow to initiate click before page is fully loadedCan a website detect when you are using selenium with chromedriver?How to get updated html data without refreshing the page seleniumWeb element not identified by selenium






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm using Selenium Basic to collect data from a website and store this into a database. The page I'm scraping is dynamic and loads more information as you scroll. I've been able to address most of this by using the implicit/ explicit waits, etc.



I am capturing all the IDs necessary to create the click action, which opens up another javascript popup for me to collect information there. However, even though I've been able to get these new IDs when the page loads by scrolling, when the app uses that new ID to click, I'm getting an error saying the element cannot be found. This is preventing me from opening up the javascript windows for these newly loaded rows.



When I go to collect this new data, the elements don't exist even though I was able to get the IDs for them.
When I look at the DOM in the browser and page source, all of it is there, so I don't believe it's an issue of letting the browser load.



I've tried utilizing the wait methods (implicit/explicit)...I've even put in hard 60 second waits through the routine. No matter what I do, the routine bombs out after the first 10 rows because it can't find the elements to the data it found after scrolling. I've also tried this using Chrome as well.



Unfortunately, the website needs to be private, so I can't provide the full code. The issue that's happening comes here:



driver.FindElementByXPath("//*[contains(text(),'" & DBA!ParseID & "')]").Click



The error I get is "Element not found for XPath("//*[contains(text(),'ID12345"')]



ParseID is the ID found from parsing elements within the body tag. So, I am able to collect all the IDs after loading all the data, but when it goes to click using the above code, it only works for the initial 10 rows. Everything loaded after that will not work (even though they've been loaded in the Browser for quite some time).



What I should be getting is, say 20 IDs which can create 20 clicks to javascript pop-ups to get more information. However, I am getting 20 IDs but the ability to only click on the first 10, even though I've loaded the entire page.










share|improve this question
























  • Perhaps your code trial //*[contains(text(),'" & DBA!ParseID & "')] and the error Element not found for XPath("//*[contains(text(),'ID12345"')] doesn't match.

    – DebanjanB
    Mar 26 at 10:33











  • Can you provide the url and more of the script?

    – QHarr
    Mar 26 at 11:10











  • I did think of that. Triple checked; they match. If only it were that easy!

    – Rob
    Mar 26 at 11:39











  • Unfortunately I cannot provide the URL because it has personal information on it. I will post more code once I get to the office. Again, the code seems to work up until the page loads more data. Then it's as is if it never updated the DOM.

    – Rob
    Mar 26 at 11:40












  • Is there a viewport where items need to be in focus in order to work?

    – QHarr
    Mar 26 at 12:17

















1















I'm using Selenium Basic to collect data from a website and store this into a database. The page I'm scraping is dynamic and loads more information as you scroll. I've been able to address most of this by using the implicit/ explicit waits, etc.



I am capturing all the IDs necessary to create the click action, which opens up another javascript popup for me to collect information there. However, even though I've been able to get these new IDs when the page loads by scrolling, when the app uses that new ID to click, I'm getting an error saying the element cannot be found. This is preventing me from opening up the javascript windows for these newly loaded rows.



When I go to collect this new data, the elements don't exist even though I was able to get the IDs for them.
When I look at the DOM in the browser and page source, all of it is there, so I don't believe it's an issue of letting the browser load.



I've tried utilizing the wait methods (implicit/explicit)...I've even put in hard 60 second waits through the routine. No matter what I do, the routine bombs out after the first 10 rows because it can't find the elements to the data it found after scrolling. I've also tried this using Chrome as well.



Unfortunately, the website needs to be private, so I can't provide the full code. The issue that's happening comes here:



driver.FindElementByXPath("//*[contains(text(),'" & DBA!ParseID & "')]").Click



The error I get is "Element not found for XPath("//*[contains(text(),'ID12345"')]



ParseID is the ID found from parsing elements within the body tag. So, I am able to collect all the IDs after loading all the data, but when it goes to click using the above code, it only works for the initial 10 rows. Everything loaded after that will not work (even though they've been loaded in the Browser for quite some time).



What I should be getting is, say 20 IDs which can create 20 clicks to javascript pop-ups to get more information. However, I am getting 20 IDs but the ability to only click on the first 10, even though I've loaded the entire page.










share|improve this question
























  • Perhaps your code trial //*[contains(text(),'" & DBA!ParseID & "')] and the error Element not found for XPath("//*[contains(text(),'ID12345"')] doesn't match.

    – DebanjanB
    Mar 26 at 10:33











  • Can you provide the url and more of the script?

    – QHarr
    Mar 26 at 11:10











  • I did think of that. Triple checked; they match. If only it were that easy!

    – Rob
    Mar 26 at 11:39











  • Unfortunately I cannot provide the URL because it has personal information on it. I will post more code once I get to the office. Again, the code seems to work up until the page loads more data. Then it's as is if it never updated the DOM.

    – Rob
    Mar 26 at 11:40












  • Is there a viewport where items need to be in focus in order to work?

    – QHarr
    Mar 26 at 12:17













1












1








1








I'm using Selenium Basic to collect data from a website and store this into a database. The page I'm scraping is dynamic and loads more information as you scroll. I've been able to address most of this by using the implicit/ explicit waits, etc.



I am capturing all the IDs necessary to create the click action, which opens up another javascript popup for me to collect information there. However, even though I've been able to get these new IDs when the page loads by scrolling, when the app uses that new ID to click, I'm getting an error saying the element cannot be found. This is preventing me from opening up the javascript windows for these newly loaded rows.



When I go to collect this new data, the elements don't exist even though I was able to get the IDs for them.
When I look at the DOM in the browser and page source, all of it is there, so I don't believe it's an issue of letting the browser load.



I've tried utilizing the wait methods (implicit/explicit)...I've even put in hard 60 second waits through the routine. No matter what I do, the routine bombs out after the first 10 rows because it can't find the elements to the data it found after scrolling. I've also tried this using Chrome as well.



Unfortunately, the website needs to be private, so I can't provide the full code. The issue that's happening comes here:



driver.FindElementByXPath("//*[contains(text(),'" & DBA!ParseID & "')]").Click



The error I get is "Element not found for XPath("//*[contains(text(),'ID12345"')]



ParseID is the ID found from parsing elements within the body tag. So, I am able to collect all the IDs after loading all the data, but when it goes to click using the above code, it only works for the initial 10 rows. Everything loaded after that will not work (even though they've been loaded in the Browser for quite some time).



What I should be getting is, say 20 IDs which can create 20 clicks to javascript pop-ups to get more information. However, I am getting 20 IDs but the ability to only click on the first 10, even though I've loaded the entire page.










share|improve this question
















I'm using Selenium Basic to collect data from a website and store this into a database. The page I'm scraping is dynamic and loads more information as you scroll. I've been able to address most of this by using the implicit/ explicit waits, etc.



I am capturing all the IDs necessary to create the click action, which opens up another javascript popup for me to collect information there. However, even though I've been able to get these new IDs when the page loads by scrolling, when the app uses that new ID to click, I'm getting an error saying the element cannot be found. This is preventing me from opening up the javascript windows for these newly loaded rows.



When I go to collect this new data, the elements don't exist even though I was able to get the IDs for them.
When I look at the DOM in the browser and page source, all of it is there, so I don't believe it's an issue of letting the browser load.



I've tried utilizing the wait methods (implicit/explicit)...I've even put in hard 60 second waits through the routine. No matter what I do, the routine bombs out after the first 10 rows because it can't find the elements to the data it found after scrolling. I've also tried this using Chrome as well.



Unfortunately, the website needs to be private, so I can't provide the full code. The issue that's happening comes here:



driver.FindElementByXPath("//*[contains(text(),'" & DBA!ParseID & "')]").Click



The error I get is "Element not found for XPath("//*[contains(text(),'ID12345"')]



ParseID is the ID found from parsing elements within the body tag. So, I am able to collect all the IDs after loading all the data, but when it goes to click using the above code, it only works for the initial 10 rows. Everything loaded after that will not work (even though they've been loaded in the Browser for quite some time).



What I should be getting is, say 20 IDs which can create 20 clicks to javascript pop-ups to get more information. However, I am getting 20 IDs but the ability to only click on the first 10, even though I've loaded the entire page.







vba selenium dom






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 17:00







Rob

















asked Mar 26 at 10:10









RobRob

63 bronze badges




63 bronze badges












  • Perhaps your code trial //*[contains(text(),'" & DBA!ParseID & "')] and the error Element not found for XPath("//*[contains(text(),'ID12345"')] doesn't match.

    – DebanjanB
    Mar 26 at 10:33











  • Can you provide the url and more of the script?

    – QHarr
    Mar 26 at 11:10











  • I did think of that. Triple checked; they match. If only it were that easy!

    – Rob
    Mar 26 at 11:39











  • Unfortunately I cannot provide the URL because it has personal information on it. I will post more code once I get to the office. Again, the code seems to work up until the page loads more data. Then it's as is if it never updated the DOM.

    – Rob
    Mar 26 at 11:40












  • Is there a viewport where items need to be in focus in order to work?

    – QHarr
    Mar 26 at 12:17

















  • Perhaps your code trial //*[contains(text(),'" & DBA!ParseID & "')] and the error Element not found for XPath("//*[contains(text(),'ID12345"')] doesn't match.

    – DebanjanB
    Mar 26 at 10:33











  • Can you provide the url and more of the script?

    – QHarr
    Mar 26 at 11:10











  • I did think of that. Triple checked; they match. If only it were that easy!

    – Rob
    Mar 26 at 11:39











  • Unfortunately I cannot provide the URL because it has personal information on it. I will post more code once I get to the office. Again, the code seems to work up until the page loads more data. Then it's as is if it never updated the DOM.

    – Rob
    Mar 26 at 11:40












  • Is there a viewport where items need to be in focus in order to work?

    – QHarr
    Mar 26 at 12:17
















Perhaps your code trial //*[contains(text(),'" & DBA!ParseID & "')] and the error Element not found for XPath("//*[contains(text(),'ID12345"')] doesn't match.

– DebanjanB
Mar 26 at 10:33





Perhaps your code trial //*[contains(text(),'" & DBA!ParseID & "')] and the error Element not found for XPath("//*[contains(text(),'ID12345"')] doesn't match.

– DebanjanB
Mar 26 at 10:33













Can you provide the url and more of the script?

– QHarr
Mar 26 at 11:10





Can you provide the url and more of the script?

– QHarr
Mar 26 at 11:10













I did think of that. Triple checked; they match. If only it were that easy!

– Rob
Mar 26 at 11:39





I did think of that. Triple checked; they match. If only it were that easy!

– Rob
Mar 26 at 11:39













Unfortunately I cannot provide the URL because it has personal information on it. I will post more code once I get to the office. Again, the code seems to work up until the page loads more data. Then it's as is if it never updated the DOM.

– Rob
Mar 26 at 11:40






Unfortunately I cannot provide the URL because it has personal information on it. I will post more code once I get to the office. Again, the code seems to work up until the page loads more data. Then it's as is if it never updated the DOM.

– Rob
Mar 26 at 11:40














Is there a viewport where items need to be in focus in order to work?

– QHarr
Mar 26 at 12:17





Is there a viewport where items need to be in focus in order to work?

– QHarr
Mar 26 at 12:17












1 Answer
1






active

oldest

votes


















0














This issue hasn't been resolved the way I initially expected, but I've accomplished what I needed through a different and more efficient way.



First, when I researched this further by removing certain IDs in my loop, I noticed that this really didn't have much to do with data updating in the DOM or browser, but rather the ID itself not being found by a (still) unknown reason. It actually seems very arbitrary why it's bombing out. The ID matches the ID in the DOM, but when the string is being moved to the XPath, it can't find it in the DOM. I'm not sure why this would occur unless the string is breaking when being passed somehow, but I'll just let that one remain mysterious until someone smarter comes along!



What I did to accomplish what I needed is loop through the actual class N times, and pull the elements I needed within the classes. Rather than use the ID above as a unique identifier, I used the count of class web elements as the identifier. This worked with 90% less code.



Thank you all!






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354483%2fdom-not-refreshing-with-selenium-ie-chrome-and-vba%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This issue hasn't been resolved the way I initially expected, but I've accomplished what I needed through a different and more efficient way.



    First, when I researched this further by removing certain IDs in my loop, I noticed that this really didn't have much to do with data updating in the DOM or browser, but rather the ID itself not being found by a (still) unknown reason. It actually seems very arbitrary why it's bombing out. The ID matches the ID in the DOM, but when the string is being moved to the XPath, it can't find it in the DOM. I'm not sure why this would occur unless the string is breaking when being passed somehow, but I'll just let that one remain mysterious until someone smarter comes along!



    What I did to accomplish what I needed is loop through the actual class N times, and pull the elements I needed within the classes. Rather than use the ID above as a unique identifier, I used the count of class web elements as the identifier. This worked with 90% less code.



    Thank you all!






    share|improve this answer



























      0














      This issue hasn't been resolved the way I initially expected, but I've accomplished what I needed through a different and more efficient way.



      First, when I researched this further by removing certain IDs in my loop, I noticed that this really didn't have much to do with data updating in the DOM or browser, but rather the ID itself not being found by a (still) unknown reason. It actually seems very arbitrary why it's bombing out. The ID matches the ID in the DOM, but when the string is being moved to the XPath, it can't find it in the DOM. I'm not sure why this would occur unless the string is breaking when being passed somehow, but I'll just let that one remain mysterious until someone smarter comes along!



      What I did to accomplish what I needed is loop through the actual class N times, and pull the elements I needed within the classes. Rather than use the ID above as a unique identifier, I used the count of class web elements as the identifier. This worked with 90% less code.



      Thank you all!






      share|improve this answer

























        0












        0








        0







        This issue hasn't been resolved the way I initially expected, but I've accomplished what I needed through a different and more efficient way.



        First, when I researched this further by removing certain IDs in my loop, I noticed that this really didn't have much to do with data updating in the DOM or browser, but rather the ID itself not being found by a (still) unknown reason. It actually seems very arbitrary why it's bombing out. The ID matches the ID in the DOM, but when the string is being moved to the XPath, it can't find it in the DOM. I'm not sure why this would occur unless the string is breaking when being passed somehow, but I'll just let that one remain mysterious until someone smarter comes along!



        What I did to accomplish what I needed is loop through the actual class N times, and pull the elements I needed within the classes. Rather than use the ID above as a unique identifier, I used the count of class web elements as the identifier. This worked with 90% less code.



        Thank you all!






        share|improve this answer













        This issue hasn't been resolved the way I initially expected, but I've accomplished what I needed through a different and more efficient way.



        First, when I researched this further by removing certain IDs in my loop, I noticed that this really didn't have much to do with data updating in the DOM or browser, but rather the ID itself not being found by a (still) unknown reason. It actually seems very arbitrary why it's bombing out. The ID matches the ID in the DOM, but when the string is being moved to the XPath, it can't find it in the DOM. I'm not sure why this would occur unless the string is breaking when being passed somehow, but I'll just let that one remain mysterious until someone smarter comes along!



        What I did to accomplish what I needed is loop through the actual class N times, and pull the elements I needed within the classes. Rather than use the ID above as a unique identifier, I used the count of class web elements as the identifier. This worked with 90% less code.



        Thank you all!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 14:43









        RobRob

        63 bronze badges




        63 bronze badges


















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354483%2fdom-not-refreshing-with-selenium-ie-chrome-and-vba%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            용인 삼성생명 블루밍스 목차 통계 역대 감독 선수단 응원단 경기장 같이 보기 외부 링크 둘러보기 메뉴samsungblueminx.comeh선수 명단용인 삼성생명 블루밍스용인 삼성생명 블루밍스ehsamsungblueminx.comeheheheh

            155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해