Greetings,
I recently joined a company who want to use Python to program Selenium
RC. In the past I have used Java and Eclipse to program Selenium. I
haven't had to spend time looking up APIs in years because auto
completion works flawlessly with Java.
Now that I have switched to Python I'm finding that auto completion is
not working. If I enter object dot then wait with standard Python
library elements it works great. I get a list of the methods and
variables available to that object. However, it does not work for
selenium objects. For example,
from selenium import webdriver
# Below, when I enter the . it gives me a list of methods available to
webdriver.
driver = webdriver.Firefox()
driver.get("
http://www.google.ca")
input = driver.find_element_by_name("q")
# At this point everything is working fine.
# Below if I enter input. it display a list of methods which aren't
relative to a webelement
# Here is the full list of suggested methods:
input.__call__
input.__class__
input.__cmp__
input.__delattr__
input.__doc__
input.__eq__
input.__format__()
input.__ge__
input.__getattribute__
input.__gt__
input.__hash__
input.__init__
input.__le__
input.__lt__
input.__module__
input.__name__
input.__ne__
input.__new__(S, ___)
input.__reduce__()
input.__reduce_ex__()
input.__repr__
input.__self__
input.__setattr__
input.__sizeof__()
input.__str__
input.__subclasshook__()
I have even tried using:
from
selenium.webdriver.common.by import By
input = driver.find_element(By.NAME, "q")
and input. does not do proper auto completion. It just seems to be the
Selenium APIs. Using time, re, sys, etc. works fine. Using selenium
and webdriver works but webelement does not. Is this a configuration
issue or a problem with how the Selenium Python code is laid out?