Coder Social home page Coder Social logo

metallize's People

Contributors

mossington avatar samtreweek-bjss avatar sarcasticfringehead avatar serialbandicoot avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

accept-li

metallize's Issues

Clear data before insert should be optional but defaulted to clear

Currently text fields are cleared down as default, however there might be occasions when you do not want to clear.

 def fill_in_field_data
      @fields.each do |field|
        unless field.kind_of?(Metallize::Form::Hidden)

          element = @driver.find_element(name: field.name)
          if element.displayed? and !field.value.empty?
            element.clear
            element.send_keys field.value
          end

        end
      end
    end

On Metz initialise an attr should be set so we don't clear down the fields first.

e.g. timeout uses the same procedure.

Getting Travis working with VSCode - to send notifications to Slcak

This issue may be incorrect as iโ€™m reading it from a slack comment.

It would be good if we could get Travis configured to send slack notifications to Slack instead of Sam's personal e-mail

https:.//docs.travis-ci.com/user/notifications/#configureing-slack-notifications

File uploads not currently available

There is currently no way to upload a file.

https://github.com/sparklemotion/mechanize/blob/master/examples/flickr_upload.rb

class Mechanize::Form::FileUpload < Mechanize::Form::Field
  attr_accessor :file_name # File name
  attr_accessor :mime_type # Mime Type (Optional)

  alias :file_data :value
  alias :file_data= :value=

  def initialize node, file_name
    @file_name = Mechanize::Util.html_unescape(file_name)
    @file_data = nil
    @node      = node
    super(node, @file_data)
  end
end

Fix rspec test file path

Currently RSpec cannot be run from spec terminal because of the way the Metz library is being initiated.

Inject all field data into the page instead of using send keys

Currently to insert data into the page, send_key is being used.

 def fill_in_field_data
      @fields.each do |field|
        unless field.kind_of?(Metallize::Form::Hidden)

          element = @driver.find_element(name: field.name)
          if element.displayed? and !field.value.empty?
            element.clear
            element.send_keys field.value
          end

        end
      end
    end

Instead of using send_keys, it would be more efficient to inject the data straight in, for example using javascript.

Passing JS as one line instead of several

Currently when setting a field with JS via the WebDriver Injector the code is executing in two statements.

js_size   = "return document.getElementsByName(\"#{field.name}\").length"
js_update = "document.getElementsByName(\"#{field.name}\")[0].value = '#{field.value}'"

if execute(driver, js_size) > 0
   execute(driver, js_update)
else
   raise "Unable to locate web element with javascript element #{field.name}"
end

A fix will be to execute this in 1 statement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.