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
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
add a comment |
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
Please provide your code. For the meantime try usingdriver.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 basicfind_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
add a comment |
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
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
python selenium
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 usingdriver.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 basicfind_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
add a comment |
Please provide your code. For the meantime try usingdriver.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 basicfind_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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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