Linked Questions

5 votes
3 answers
12k views

How can I get html content written by JavaScript with Selenium/Python [duplicate]

I'm doing web-crawling with Selenium and I want to get an element(such as a link) written by JavaScript after Selenium simulating clicking on a fake link. I tried get_html_source(), but it doesn't ...
Friedmannn's user avatar
-1 votes
1 answer
221 views

Screenshot on View Page source using selenium webdriver using java [duplicate]

Hi i want to take screenshot on the view page source to verify the Release details, is there any possibility of taking the screenshot on page source or i need to get the text from the particular line ...
Hari's user avatar
  • 1
152 votes
8 answers
274k views

Selenium - wait until element is present, visible and interactable

I have a Selenium script (Python) that clicks a reply button to make the class anonemail appear. The time it takes for the class anonemail to appear varies. Because of that I have to use sleep until ...
Benjamin Arvola's user avatar
86 votes
4 answers
219k views

AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'

from selenium import webdriver import time test = webdriver.Chrome() test.get('https://docs.google.com/forms/d/e/1FAIpQLSeYUmAYYZNtbU8t8MRxwJo- d1zkmSaEHodJXs78RzoG0yFY2w/viewform') time....
fireslayer47's user avatar
51 votes
4 answers
122k views

How to get innerHTML of whole page in selenium driver?

I'm using selenium to click to the web page I want, and then parse the web page using Beautiful Soup. Somebody has shown how to get inner HTML of an element in a Selenium WebDriver. Is there a way ...
YJZ's user avatar
  • 4,244
64 votes
1 answer
65k views

Official locator strategies for the webdriver

In the official W3C webdriver documentation, it's clearly stated that the location strategies are: State Keyword ----------------------------------------------- CSS selector ...
Merc's user avatar
  • 17.2k
11 votes
2 answers
26k views

How to get Inspect Element code using Selenium WebDriver

I'm working in selenium with Firefox browser. The Html code shown in View Source (CTRL+U) is different from the html code i see when inspecting the elements in Firefox. When i run the driver....
user2782522's user avatar
9 votes
6 answers
4k views

Java GUI to display webpages and return HTML

I need a workflow like below: // load xyz.com in the browser window // the browser is live, meaning users can interact with it browser.load("http://www.google.com"); // return the HTML of the ...
Moeb's user avatar
  • 10.9k
6 votes
2 answers
4k views

Get the source code of an element

Is there a similar way in Laravel Dusk as we have in Selenium, to get the source code of an element by 'innerHTML attribute'? Ex: innerHTML for <div>Hello <p>World!</p></div> ...
shaebi's user avatar
  • 99
4 votes
2 answers
11k views

Selenium webdriver returns empty list from find_elements_by_X

My goal is to get a list of the names of all the new items that have been posted on https://www.prusaprinters.org/prints during the full 24 hours of a given day. Through a bit of reading I've learned ...
TempleGuard527's user avatar
3 votes
3 answers
13k views

What is the difference between WebDriver and WebElement in Selenium?

What is the difference between WebDriver and WebElement in Selenium? Sample Code: WebDriver driver = new FirefoxDriver(); driver.get("http://www.google.com"); WebElement s = driver....
Elegant Student's user avatar
2 votes
2 answers
5k views

How to get a full-page screenshot in Python using Selenium and Screenshot

I'm trying to get a full-length screenshot and haven't been able to make it work. Here's the code I'm using: from Screenshot import Screenshot from selenium import webdriver import time ob = ...
matt_lnrd's user avatar
  • 349
1 vote
4 answers
10k views

How to get the text associated with a checkbox in Java

I have below html, how can i get the chechbox names? <html> <body> <form> <input type="checkbox" name="Countries" value="US">Unites States</input> <input type="...
Uday's user avatar
  • 1,494
-1 votes
1 answer
8k views

Can't capture by driver.find_element_by_xpath used by selenium

I am trying to capture a button to click on it. the source url is: The goal is to provide free information to website users and owners regarding website security status. <br> ...
MLSC's user avatar
  • 5,972
1 vote
3 answers
2k views

Selenium pattern matching

Needed some help with pattern matching in Selenium. I am trying to read the following inner div tags, <div> <div class="xyz one"></div> <div class="xyz two"></...
konkani's user avatar
  • 518

15 30 50 per page