question-mark
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.

Documentation about manipulating elements

See original GitHub issue

When evaluating Pylenium we struggled to find out how to manipulate elements, e.g. type some text in an <input>. It seems that Pylenium does not care about this use case at all. After some digging we learned that all we need to do is to use the underlying Selenium WebElement:

py.get('input[name="username"]').webelement.send_keys('admin')

I wonder if this is a deliberate design decision? Does Pylenium encourage using the Selenium APIs? Or is the scope of Pylenium to be a test tool for websites with mostly static content?

In any case I think new users would benefit if the documentation had a section about this topic. What do you think?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
vernkocommented, Mar 4, 2021

Per your example, here is a link from the docs on how to type into a field.

https://elsnoman.gitbook.io/pylenium/element-commands/type

if you look in the element command section of the documentation, there is a list of them commands you are able to do with elements.

also pylenium is continually being worked on, if feel it needs something, keep raising concerns like this!

hopefully my answer was helpful!

On Thu, Mar 4, 2021 at 4:30 AM Henning Schindler notifications@github.com wrote:

When evaluating Pylenium we struggled to find out how to manipulate elements, e.g. type some text in an . It seems that Pylenium does not care about this use case at all. After some digging we learned that all we need to do is to use the underlying Selenium WebElement:

py.get(‘input[name=“username”]’).webelement.send_keys(‘admin’)

I wonder if this is a deliberate design decision? Does Pylenium encourage using the Selenium APIs? Or is the scope of Pylenium to be a test tool for websites with mostly static content?

In any case I think new users would benefit if the documentation had a section about this topic. What do you think?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ElSnoMan/pyleniumio/issues/162, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHZS6S6I4HGPDUWZHBBWUIDTB5VO5ANCNFSM4YTCKD7A .

1reaction
ElSnoMancommented, Apr 11, 2021

Added another test example and called out the different Commands like .type() and the Should objects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manipulating documents - Learn web development | MDN
When writing web pages and apps, one of the most common things you'll want to do is manipulate the document structure in some...
Read more >
How to Manipulate the DOM - the Ultimate Beginner's Guide
The DOM stands for Document Object Model. It can simply be understood as a tree of nodes created by the browser. Each of...
Read more >
Manipulating Elements - jQuery Learning Center
Manipulating Elements. For complete documentation of jQuery manipulation methods, visit the Manipulation documentation on api.jquery.com.
Read more >
What Is DOM Manipulation? - Medium
DOM manipulation is interacting with the DOM API to change/modify the HTML document that is to be rendered on the web browser. This...
Read more >
Manipulating DOM Elements in JavaScript - Tutorial Republic
In this tutorial you will learn how to manipulate elements in JavaScript. ... Now that you've learnt how to select and style HTML...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found