-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble with login form #17
Comments
I get this: Interactive Elixir (1.0.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> use TucoTuco.DSL
:ok
iex(2)> TucoTuco.start_session :test_browser, :tuco_test, :phantomjs
{:ok,
%TucoTuco.SessionPool.SessionPoolState{app_root: nil,
current_session: :tuco_test, max_retry_time: 2000, retry_delay: 50,
use_retry: false}}
iex(3)> visit "http://games.espn.go.com/ffl/signin"
{:ok,
%WebDriver.Protocol.Response{request: %WebDriver.Protocol.Request{body: "{\"url\":\"http://games.espn.go.com/ffl/signin\"}",
headers: ["Content-Type": "application/json;charset=UTF-8",
"Content-Length": 45], method: :POST,
url: "http://localhost:51536/wd/hub/session/a331a610-5fca-11e4-a22e-43b41d396fc3/url"},
session_id: "a331a610-5fca-11e4-a22e-43b41d396fc3", status: 0, value: %{}}}
iex(4)> fill_in "username", "cookiemonsters20"
{:error, "No field found with id, name or label specified"}
iex(5)>
For me the username field is an input with no type attribute, so Finder.find :fillable_field, ... does not find it. Use Element.value/2 to fill it. eg Also the password field was not getting filled: fixed in 0.7.1. I'm not sure what exactly is happening in your trace. Can you run it with Firefox or Chrome and see if the fields are actually getting filled in correctly? (Or use save_screenshot with phantomjs.) |
screenshots....cool, I'll try that sorry, I forgot to mention I got it to work by removing @type='text' in finder.ex #line 50 btw: after this change, I thought the password field was filled. Well, just using Finder and Element to get the value.
|
You are right, the usual thing is to default to a text input. There's a bunch of other HTML5 input types too that could be considered fillable. I will have to change that. You would get an error if the password field did not fill, so from the gist that looked like it worked. |
Still doesn't work. also tried firefox, but it barfs (I did do the webdriver.firefox.install) see errors: |
Firefox was dying because the plugin was out of date. I'm a bit stuck with Firefox versions as there are different versions of the webdriver.xpi plugin from Selenium that work with various Firefox versions. |
I'm trying to work with an external site to scrape data.
The data is unique per user, so I need to login.
When I click the submit button with tucotuco, the resulting page is wrong. I'm not logged in.
The form in question has a lot of hidden fields. Could that be an issue?
Here's a gist of an iex session.
https://gist.github.com/dgoldie/52fc48132aceff96e787
Am I doing something wrong?
thanks,
-doug.
To see the correct actions, manually:
The login form is at: "http://games.espn.go.com/ffl/signin"
I have a dummy account:
username: "cookiemonsters20"
password: "password1"
you'll know you're logged if:
with two teams listed, each with two links. One is "The Kerber League"
The text was updated successfully, but these errors were encountered: