informatica:linux:selenium
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
informatica:linux:selenium [2019/09/23 19:29] – jose | informatica:linux:selenium [2019/09/24 07:20] – [Python firefox headless local] javi | ||
---|---|---|---|
Line 146: | Line 146: | ||
====== Python firefox headless local ====== | ====== Python firefox headless local ====== | ||
+ | |||
+ | ===== Sin profile ===== | ||
+ | |||
**IMPORTANTE**: | **IMPORTANTE**: | ||
Line 157: | Line 160: | ||
from selenium.webdriver import Firefox | from selenium.webdriver import Firefox | ||
- | | + | # Local headless |
- | options.add_argument(' | + | options = Options() |
- | | + | options.headless |
- | d.set_window_size(1920, 1080) | + | driver |
- | | + | </ |
+ | |||
+ | ===== Con profile ===== | ||
+ | |||
+ | < | ||
+ | from selenium.webdriver.firefox.options import Options | ||
+ | from selenium.webdriver import Firefox, FirefoxProfile | ||
+ | |||
+ | # Local headless | ||
+ | options = Options() | ||
+ | options.headless = True | ||
+ | driver = Firefox(firefox_profile = profile, options = options) | ||
</ | </ | ||
informatica/linux/selenium.txt · Last modified: 2022/12/27 09:08 by jose