Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

_element should become part of the official API (allows Selenium calls)

See original GitHub issue

Issue Description

Let’s look at some code similar to something I write using Splinter:

a = browser.find_by_id("foo")
txt = a._element.get_attribute('outerHTML')
   txt.find('some HTML')
   print("Test FAIL")
   return -1

The point being, I’m using _element to access a method in the underlying Selenium that Splinter does not appear to support.

We should make this part of the official API: If you want to do something with an element and Splinter does not support it, use _element to make the required Selenium call. This way, already written code does not need to be revised.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

andrewsmedinacommented, Aug 16, 2018

There is no plan to remove the _element for selenium based drivers. But If the community embrace the idea we can follow a path to make this official. Making a way to officially expose the driver element.

andrewsmedinacommented, Aug 16, 2018

In the @samboy case it is possible to access the element attributes:

txt = a['outerHTML']

In @youtux case I believe that we should solve this add a execute_script by element

What do you guys think about it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

7. WebDriver API — Selenium Python Bindings 2 documentation
Official API documentation is available here. ... The Element Click command could not be completed because the element receiving the events is obscuring...
Read more >
Selenium Assertion Examples - Practical Applications In Projects
This Tutorial will Explain How to use Assertions in Various Project Scenarios in Simple Terms With the help of Real-life Practical Examples.
Read more >
Selenium API and Architecture - All Details with Diagrams and ...
Selenium API related information is explained with all details. You can understand webdriver API with Diagram and Mindmap representations.
Read more >
Finding web elements - Selenium
Locating the elements based on the provided locator values.
Read more >
Selenium Interview Questions & Answers
Question: What all different element locators are available with Selenium? Answer: Selenium uses following method to access elements:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found