How to switch to the pop up using seleniumHow to merge two dictionaries in a single expression?How do I check if a list is empty?Replacements for switch statement in Python?How do I check whether a file exists without exceptions?How can I safely create a nested directory in Python?How do I sort a dictionary by value?How to make a chain of function decorators?How to make a flat list out of list of lists?How do I list all files of a directory?Peak detection in a 2D array

What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?

Did arcade monitors have same pixel aspect ratio as TV sets?

How should I respond when I lied about my education and the company finds out through background check?

Does the Linux kernel need a file system to run?

15% tax on $7.5k earnings. Is that right?

Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?

PTIJ: Haman's bad computer

Quoting Keynes in a lecture

The probability of Bus A arriving before Bus B

Lowest total scrabble score

Are Captain Marvel's powers affected by Thanos' actions in Infinity War

Can I say "fingers" when referring to toes?

The IT department bottlenecks progress. How should I handle this?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

Is there a way to get `mathscr' with lower case letters in pdfLaTeX?

Is this toilet slogan correct usage of the English language?

Can the US President recognize Israel’s sovereignty over the Golan Heights for the USA or does that need an act of Congress?

What is Cash Advance APR?

Creepy dinosaur pc game identification

Hero deduces identity of a killer

Why should universal income be universal?

Does malloc reserve more space while allocating memory?

How to explain what's wrong with this application of the chain rule?

What should you do when eye contact makes your subordinate uncomfortable?



How to switch to the pop up using selenium


How to merge two dictionaries in a single expression?How do I check if a list is empty?Replacements for switch statement in Python?How do I check whether a file exists without exceptions?How can I safely create a nested directory in Python?How do I sort a dictionary by value?How to make a chain of function decorators?How to make a flat list out of list of lists?How do I list all files of a directory?Peak detection in a 2D array













0















I am trying to get admin name from a public facebook page. When I click 3 other members on the page there is a pop up with all the admin name. Now the html changes here and a new div appears in the inspect. How to handle that. I cannot get the new html by using driver.page_source.



Adding Images for more help.



Image 1:





Image 2:












share|improve this question
























  • Please provide your code. For the meantime try using driver.switch_to.active_element.

    – Ibaboiii
    Mar 7 at 6:40











  • element = driver.find_element_by_partial_link_text('other members') driver.execute_script("arguments[1].click();", element) For now, I am using this to click " 3 other members" on the page. BUt if I want to get its source I am unable to do it.

    – Ankit Shankhala
    Mar 7 at 7:18












  • element = driver.find_element_by_partial_link_text('other members') time.sleep(2) driver.execute_script("arguments[0].click();", element) driver.switch_to.active_element html = driver.page_source soup = BeautifulSoup(html)

    – Ankit Shankhala
    Mar 7 at 7:39











  • 1/ I think that if you copy Xpath, it should work ( its on the website, so this "pop up" should not be a problem to hndle using basic find_element_by.... 2/ this is what people refer to a pop up: <guru99.com/alert-popup-handling-selenium.html>

    – StyleZ
    Mar 7 at 8:17















0















I am trying to get admin name from a public facebook page. When I click 3 other members on the page there is a pop up with all the admin name. Now the html changes here and a new div appears in the inspect. How to handle that. I cannot get the new html by using driver.page_source.



Adding Images for more help.



Image 1:





Image 2:












share|improve this question
























  • Please provide your code. For the meantime try using driver.switch_to.active_element.

    – Ibaboiii
    Mar 7 at 6:40











  • element = driver.find_element_by_partial_link_text('other members') driver.execute_script("arguments[1].click();", element) For now, I am using this to click " 3 other members" on the page. BUt if I want to get its source I am unable to do it.

    – Ankit Shankhala
    Mar 7 at 7:18












  • element = driver.find_element_by_partial_link_text('other members') time.sleep(2) driver.execute_script("arguments[0].click();", element) driver.switch_to.active_element html = driver.page_source soup = BeautifulSoup(html)

    – Ankit Shankhala
    Mar 7 at 7:39











  • 1/ I think that if you copy Xpath, it should work ( its on the website, so this "pop up" should not be a problem to hndle using basic find_element_by.... 2/ this is what people refer to a pop up: <guru99.com/alert-popup-handling-selenium.html>

    – StyleZ
    Mar 7 at 8:17













0












0








0








I am trying to get admin name from a public facebook page. When I click 3 other members on the page there is a pop up with all the admin name. Now the html changes here and a new div appears in the inspect. How to handle that. I cannot get the new html by using driver.page_source.



Adding Images for more help.



Image 1:





Image 2:












share|improve this question
















I am trying to get admin name from a public facebook page. When I click 3 other members on the page there is a pop up with all the admin name. Now the html changes here and a new div appears in the inspect. How to handle that. I cannot get the new html by using driver.page_source.



Adding Images for more help.



Image 1:





Image 2:









python selenium






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 7:33









DebanjanB

44.9k134588




44.9k134588










asked Mar 7 at 6:34









Ankit ShankhalaAnkit Shankhala

84




84












  • Please provide your code. For the meantime try using driver.switch_to.active_element.

    – Ibaboiii
    Mar 7 at 6:40











  • element = driver.find_element_by_partial_link_text('other members') driver.execute_script("arguments[1].click();", element) For now, I am using this to click " 3 other members" on the page. BUt if I want to get its source I am unable to do it.

    – Ankit Shankhala
    Mar 7 at 7:18












  • element = driver.find_element_by_partial_link_text('other members') time.sleep(2) driver.execute_script("arguments[0].click();", element) driver.switch_to.active_element html = driver.page_source soup = BeautifulSoup(html)

    – Ankit Shankhala
    Mar 7 at 7:39











  • 1/ I think that if you copy Xpath, it should work ( its on the website, so this "pop up" should not be a problem to hndle using basic find_element_by.... 2/ this is what people refer to a pop up: <guru99.com/alert-popup-handling-selenium.html>

    – StyleZ
    Mar 7 at 8:17

















  • Please provide your code. For the meantime try using driver.switch_to.active_element.

    – Ibaboiii
    Mar 7 at 6:40











  • element = driver.find_element_by_partial_link_text('other members') driver.execute_script("arguments[1].click();", element) For now, I am using this to click " 3 other members" on the page. BUt if I want to get its source I am unable to do it.

    – Ankit Shankhala
    Mar 7 at 7:18












  • element = driver.find_element_by_partial_link_text('other members') time.sleep(2) driver.execute_script("arguments[0].click();", element) driver.switch_to.active_element html = driver.page_source soup = BeautifulSoup(html)

    – Ankit Shankhala
    Mar 7 at 7:39











  • 1/ I think that if you copy Xpath, it should work ( its on the website, so this "pop up" should not be a problem to hndle using basic find_element_by.... 2/ this is what people refer to a pop up: <guru99.com/alert-popup-handling-selenium.html>

    – StyleZ
    Mar 7 at 8:17
















Please provide your code. For the meantime try using driver.switch_to.active_element.

– Ibaboiii
Mar 7 at 6:40





Please provide your code. For the meantime try using driver.switch_to.active_element.

– Ibaboiii
Mar 7 at 6:40













element = driver.find_element_by_partial_link_text('other members') driver.execute_script("arguments[1].click();", element) For now, I am using this to click " 3 other members" on the page. BUt if I want to get its source I am unable to do it.

– Ankit Shankhala
Mar 7 at 7:18






element = driver.find_element_by_partial_link_text('other members') driver.execute_script("arguments[1].click();", element) For now, I am using this to click " 3 other members" on the page. BUt if I want to get its source I am unable to do it.

– Ankit Shankhala
Mar 7 at 7:18














element = driver.find_element_by_partial_link_text('other members') time.sleep(2) driver.execute_script("arguments[0].click();", element) driver.switch_to.active_element html = driver.page_source soup = BeautifulSoup(html)

– Ankit Shankhala
Mar 7 at 7:39





element = driver.find_element_by_partial_link_text('other members') time.sleep(2) driver.execute_script("arguments[0].click();", element) driver.switch_to.active_element html = driver.page_source soup = BeautifulSoup(html)

– Ankit Shankhala
Mar 7 at 7:39













1/ I think that if you copy Xpath, it should work ( its on the website, so this "pop up" should not be a problem to hndle using basic find_element_by.... 2/ this is what people refer to a pop up: <guru99.com/alert-popup-handling-selenium.html>

– StyleZ
Mar 7 at 8:17





1/ I think that if you copy Xpath, it should work ( its on the website, so this "pop up" should not be a problem to hndle using basic find_element_by.... 2/ this is what people refer to a pop up: <guru99.com/alert-popup-handling-selenium.html>

– StyleZ
Mar 7 at 8:17












0






active

oldest

votes











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%2f55037467%2fhow-to-switch-to-the-pop-up-using-selenium%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















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%2f55037467%2fhow-to-switch-to-the-pop-up-using-selenium%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

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved