X
X
xxx2017-02-09 19:36:53
Python
xxx, 2017-02-09 19:36:53

Python and selenium(webdriver) enter value in input?

from selenium import webdriver
x = '89999999999'
class Bot:
  """docstring for Bot"""
  def __init__(self):
    self.driver = webdriver.Firefox()
   	self.navigate()

   def navigate(self):
   	self.driver.get("https://vk.com/")
   	field = self.driver.find_element_by_xpath('//input[@id="index_email"]')

How to pass the value of the variable x to the selected input?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-02-09
@LazyTalent

field.send_keys(x)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question