Pitón de selenio

Ejemplos de código

0
0

pitón de selenio

import tkinter as tk
import selenium.webdriver

# --- functions ---

def on_open():
    global driver

    if not driver:
        driver = selenium.webdriver.Firefox()
        url = e.get()
        driver.get(url)

def on_close():
    global driver

    if driver:
        driver.close()
        driver = None

# --- main ---

driver = None

root  = tk.Tk()

e = tk.Entry(root)
e.pack()
e.insert('end', 'https://stackoverflow.com')

b = tk.Button(root, text='Selenium Open', command=on_open)
b.pack()

b = tk.Button(root, text='Selenium Close', command=on_close)
b.pack()

root.mainloop()

Páginas relacionadas

Páginas de ejemplo relacionadas

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................