Skip to content
This repository was archived by the owner on Dec 16, 2023. It is now read-only.

browser.fill cannot find matching element #1130

Closed
HekMe opened this issue Aug 4, 2017 · 1 comment
Closed

browser.fill cannot find matching element #1130

HekMe opened this issue Aug 4, 2017 · 1 comment

Comments

@HekMe
Copy link

HekMe commented Aug 4, 2017

When i try to fill form on visited browser, the
"No INPUT matching 'input[name=IDToken1]'"
is thrown.
But from this image you can clearly see that it's there.
image
I've tried also matching by name or other attributes, but withou any progress.
Here's my code:
`$(function(){
var Browser = require("zombie");
var assert = require("assert");

  browser = new Browser()
  browser.visit("website", function () {
    // fill search query field with value "zombie"
    browser.fill('input[name=IDToken1]', 'name');
    browser.fill('input[name=IDToken2]', 'password');
    // **how** you find a form element is irrelevant - you can use id, selector, anything you want
    // in this case it was easiest to just use built in forms collection - fire submit on element found
    browser.document.forms[0].submit();
    // wait for new page to be loaded then fire callback function
    browser.wait().then(function() {
      // just dump some debug data to see if we're on the right page
      console.log(browser.dump());
    })
  });
});`

Thanks

@HekMe
Copy link
Author

HekMe commented Feb 28, 2018

At the end of the day, I've used selenium instead of zombie.

@HekMe HekMe closed this as completed Feb 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant