Coder Social home page Coder Social logo

elementium's People

Contributors

ekostadinov avatar prschmid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elementium's Issues

Async is a keyword in Python 3.7.*

Hello,

within elements.py and se.py files, there is an 'async' parameter used which is a keyword in python3.7.* version. It could be renamed to -> asynchronous.

Regards,
Kamil

Issue with Elementium and six 1.11

Copied from an email bug report.

I do the following steps:

  1. pip install elementium

from selenium import webdriver
from elementium.drivers.se import SeElements
  1. it crashes with the following errors:
Traceback (most recent call last):
  File "fb_fill.py", line 15, in <module>
    import elementium.drivers.se
  File "/home/great/myapp/myappenv/local/lib/python2.7/site-packages/elementium/__init__.py", line 4, in <module>
    from . import elements
  File "/home/great/myapp/myappenv/local/lib/python2.7/site-packages/elementium/elements.py", line 14, in <module>
    from elementium.waiters import ConditionElementsWaiter
  File "/home/great/myapp/myappenv/local/lib/python2.7/site-packages/elementium/waiters.py", line 22, in <module>
    class Waiter(six.with_metaclass(abc.ABCMeta, object)):
  File "/home/great/myapp/myappenv/lib/python2.7/abc.py", line 87, in __new__
    cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

if I downgrade to six 1.10, everything seems to be OK.

Feature: Lazy load items

Instead of evaluating the function passed to Elements on __init__, evaluate it on the first time items are accessed.

Python 3.*

Is there any chance for update elementium to Python 3.5?

Configurable Selenium version

Currently the Selenium version is locked to 2.48, but some users would like to integrate Elementium to their own setup and versions. In my case:

elementium 1.1.10 has requirement selenium==2.48.0, but you'll have selenium 3.0.2 which is incompatible.

I would be happy to try and implement the needed changes, after a discussion @prschmid.

execute_script() should have an element option to run on

Hi,

Fist: I want to thank you for your hard work on this lib, it is awesome.

Regarding the issue:
execute_script() should have an element option in order to run code on that specific element. For example if I want to highlight the element during execution for debugging purposes using the default execute_script I can but using elementium it is harder.

Sample code (context.driver is just the driver created in the before_feature of the behave script):

browser = SeElements(context.driver)
browser.navigate("https://www.toolsqa.com/automation-practice-form/").insist(lambda e: "Demo Form" in e.title())
first_name = browser.find("input[name='firstname']", wait=True, ttl=context.timeout)
first_name.write("First Name")
script = "arguments[0].style.border='5px solid #6bf442'"

se_first_name = context.driver.find_element_by_css_selector("input[name='firstname']")
context.driver.execute_script(script, se_first_name)

first_name.execute_script(script=script)

Looking into the implementation of execute_script in se.py it is called directly on self.browser

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.