Questions tagged [splinter]

Splinter is an open source tool for testing web applications using Python

Splinter is an open source tool for testing web applications using Python. It lets you automate browser actions, such as visiting URLs and interacting with their items.

329 questions
4
votes
1 answer

How can i get text between using python splinter lib

I want get the text between I have already use lib splinter " 1 " PS: i don't want to download the page and read as html code maybe re lib is available but i don't know how to use it without…
circleone
  • 75
  • 1
  • 7
4
votes
2 answers

How to click "return" using Splinter

I cannot figure out how to click "return" when I make Splinter library to input text into reddit's main search bar and since it has no button to search, I probably must click "return" I saw a similar question here but it did not work for my case and…
Contempt
  • 189
  • 2
  • 5
  • 14
4
votes
3 answers

How to find element value using Splinter?

I have following piece of html:

foo: foo

bar: bar

foo2:

pixel
  • 24,905
  • 36
  • 149
  • 251
4
votes
1 answer

How do I click Enter using Splinter?

Here is my Splinter code - b = Browser() b.visit("http://boingboing.net") b.fill("q", "OpenXC") At this point, I would like to press "Enter" for the search to happen. This is very similar to the example in the Splinter tutorial page. In this…
Muthu Palanisamy
  • 765
  • 2
  • 9
  • 17
3
votes
2 answers

Switch to window (tab) without bringing browser to front

I am using Python and Selenium to navigate multiple tabs. How can I switch to a different window/tab without bringing the entire browser window to the front and without the selenium window "stealing" the focus of my computer? For example, if I'm…
Branden
  • 326
  • 1
  • 3
  • 14
3
votes
1 answer

Python Splinter : how to take a screenshot of full page?

As per splinter docs to Take a full view screenshot: browser = Browser() screenshot_path = browser.screenshot('absolute_path/your_screenshot.png', full=True) I am using the same code but it throws TypeError: screenshot() got an unexpected…
Divya Arya
  • 439
  • 5
  • 22
3
votes
2 answers

Getting "Exception UnexpectedAlertPresentException: Alert Text: None" and then "Exception NoAlertPresent" when I try to handle that alert

We're doing automation scripts using the following: behave==1.2.5 splinter==0.7.7 firefox headless browser When navigating to a specific page, we're executing the following code: browser = context.browser selector_button_checkout =…
Jorge
  • 182
  • 1
  • 4
  • 12
3
votes
1 answer

How to switch to window or tab in splinter webdriver python?

I am new to python and splinter. I read the docs on splinter but it doesn't mention anything about switch_to like in the selenium library. When I run this code I get an error. from splinter import Browser browser = Browser("firefox") …
3
votes
0 answers

Xvfb virtual display error, no module named fcntl

Im trying to make a virtual display for a splinter script. When i runi get the error code "ImportError: No module named 'fcntl'" from splinter import Browser from xvfbwrapper import Xvfb vdisplay = Xvfb(width=1280,…
Jaypaque
  • 59
  • 8
3
votes
0 answers

Differences between Watir Webdriver in Ruby and Splinter in Python for browser test automation?

I have already used Ruby and Watir Webdriver for browser automation. It has many positive aspects but as well as having their library, webdriver update delay and some minor issues. What are the differences between Splinter in Python language with…
3
votes
2 answers

Python Splinter. How to select dropdown list which doesn't have name in option section

I try to select "Local Host" from the dropdown list which has the following html code: Here is my…
3
votes
1 answer

Python Selenium: getting rid of Firefox first run screen

Currently my py.test + splinter + pytest-splinter tests load a Firefox welcome screen when browser instance is created: How one can get rid of this and have about:blank as a starting page as this screen is wasting some time and bandwidth on each…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
3
votes
1 answer

How can I set a cookie in splinter from a previously saved splinter instance?

So I am logging in to a site using splinter then I am grabbing the cookies after I am logged in and then saving it as a pickled object for later use. def save_cookie(username, password): browser = Browser() …
Spencer Cooley
  • 8,471
  • 16
  • 48
  • 63
3
votes
1 answer

Splinter find_by_xpath: using regex for element text()

I am running a browser test with splinter and have a page with a large table. I want to locate all elements that contain a with some nicely-formatted date in their text, like the one highlighted here: It's easy to find the rows with…
norman
  • 5,128
  • 13
  • 44
  • 75
3
votes
1 answer

Efficient web page scraping with Python/Requests/BeautifulSoup

I am trying to grab information from the Chicago Transit Authority bustracker website. In particular, I would like to quickly output the arrival ETAs for the top two buses. I can do this rather easily with Splinter; however I am running this…
1 2
3
21 22