Giter VIP home page Giter VIP logo

the-internet's Introduction

The Internet 0.58.0 (10, February 2020)

=======

An example application that captures prominent and ugly functionality found on the web. Perfect for writing automated acceptance tests against.

Deployed and available at http://the-internet.herokuapp.com.

Available Examples:

Don't see an example you need or think should be here? Contribute!

Contribution Guidelines

tldr;

  1. Fork
  2. Build Something
  3. Submit a Pull Request
  4. High Five!

Getting Started

Install your dependencies:

bundle install

Start the server:

rackup

Load the page you want to see in your browser:

http://localhost:9292/url_path

See Also

  • A Docker Image of the-internet (link)

the-internet's People

Contributors

adamgoucher avatar austenjt avatar cambiph avatar christian-bromann avatar corevo avatar ddavison avatar diemol avatar dirtydiesel46 avatar djangofan avatar jimevans avatar mmerrell avatar relsqui avatar shantdashjian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

the-internet's Issues

can you add add detailed form example?

Unless I am missing it I cant see a large form example. It would be great if one could be added with:

  1. Many different element types: radio buttons, check boxes, edits, sliders etc
  2. Nested dom
  3. A variety of good / bad / non-existent names / ids for elements

Thanks
John

No LICENSE

What is the license this is released under? It might be worth placing a LICENSE.txt in the root of the folder.

"Internal Server Error" at "File Upload" page when use drag and drop file to upload

When I use drag and drop to upload the some-file.txt file at File Upload page, the system return a Internal Server Error.

Look the log:

{:filename=>"some-file.txt", :type=>"text/plain", :name=>"file", :tempfile=>#<File:/tmp/RackMultipart20150803-17606-1odmw8i>, :head=>"Content-Disposition: form-data; name=\"file\"; filename=\"some-file.txt\"\r\nContent-Type: text/plain\r\n"}
127.0.0.1 - - [03/Aug/2015 10:19:57] "POST /upload HTTP/1.1" 200 1393 0.0039
nil
NoMethodError - undefined method `[]' for nil:NilClass:
    .../the-internet/server.rb:30:in `block in <top (required)>'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1603:in `block in compile!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `[]'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (3 levels) in route!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:985:in `route_eval'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:966:in `block (2 levels) in route!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1006:in `block in process_route'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `catch'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1004:in `process_route'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:964:in `block in route!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `each'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:963:in `route!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1076:in `block in dispatch!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1073:in `dispatch!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `block in call!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `block in invoke'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `catch'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1058:in `invoke'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:898:in `call!'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:886:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
    /var/lib/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:210:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/show_exceptions.rb:21:in `call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:180:in `call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:2014:in `call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `block in call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1788:in `synchronize'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:1478:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:49:in `_call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lint.rb:37:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/showexceptions.rb:24:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:in `call'
    /var/lib/gems/1.9.1/gems/sinatra-1.4.5/lib/sinatra/base.rb:217:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/chunked.rb:43:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
    /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
    /usr/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
    /usr/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
    /usr/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
127.0.0.1 - - [03/Aug/2015 10:19:59] "POST /upload HTTP/1.1" 500 158284 0.0409

Radio button example

Hi everyone! Could you please add a radio button example to the project? Thanks!

Download page delivers potentially malicious software

Tests of our automation framework ended up downloading the steam_api.dll yesterday and my network security team got alerted. I believe this is a false positive, but to prevent future headaches please remove the offending files.

Add an example for read-only fields

I whipped up a read-only fields example, but was unable to get it working in the docker image linked from the main page (other things were broken, too...seemed like the image is out of date).

Here is the readonly.erb file I had created. I have exceeded the time I can spend trying to setup an environment to test it in :( Hopefully you can try it out and include in a future update?

<div class="example">
  <h3>Read-only Inputs</h3>
  <form id='readonly'>
    <input type="checkbox" id="checkbox"> Text field is read-only</br>
    <input type="text" id="textfield" value="I am editable">
  </form>
</div>
<script>
var checkbox = form.getElementById('checkbox');
checkbox.onclick = function() {
	var textfield = form.getElementById('textfield');
    if (this.checked) {
   		textfield.setAttribute("readonly", "");
      	textfield.setAttribute("value", "You cannot change me");
    }
    else {
    	textfield.removeAttribute("readonly");
    	textfield.setAttribute("value", "I am editable");
    }
}
</script>

canvas example

Adding an example of a canvas that needs to be clicked, or better, that has some interactive text input would be nice.

It's kind of the limit of what current drivers can do.

Paydown style technical debt.

Some things that we need to do with regards to styling:

  • Integrate SCSS Foundation and make the universal styles generic.
  • Determine a simple class/style structure for future examples.

checkbutton page has slightly invalid markup

The checkbutton page seems to have some invalid markup. On the checkbutton page you have this markup:

<p>
    <form>
        <input type="checkbox"> unchecked</br>
        <input type="checkbox" checked> checked
    </form>
</p>

When I use chrome and firefox developer tools, it renders the form outside of the paragraph tag, and asking for an xpath returns an xpath that does not include the paragraph tag.

Doing a little digging (I'm not an HTML expert by any means), it appears that a paragraph isn't allowed to have block-level elements inside it, and a form is a block level element. Firefox and chrome seems to auto-close the paragraph before starting the form (and eventually ignoring the following close paragraph tag), but IE does not. This results in slightly different xpaths for the elements in IE versus firefox and chrome.

Since it's technically invalid to have a form inside a paragraph, it would be nice if this page didn't put forms inside of paragraphs.

More information: http://stackoverflow.com/questions/1022041/why-doesnt-form-nested-in-p-validate-as-xhtml

Geolocation: the "Where am I?" button no longer works.

Summary: "Where am I?" button in the section Geolocation doesn't work - there is no visible result after clicking on it.

Steps to reproduce: Go to the section Geolocation and click on the "Where am I?" button.

Expected results: After clicking on the "Where am I?" button the user should get his current longitude and latitude.

Actual results: There is no outcome after clicking on the button.

More info

Source URL: http://the-internet.herokuapp.com/geolocation

Browser: Chrome 69.0.3497.100

Great work!

Hi,

Excellent stuff. I can see me writing against this. May put thing into two groups?

  • Standard HTML
  • jQuery (or Rich Javascript?) and then you can added progress bars etc.

Alex

It doesn't run with rakeup

I've tried all possible ways to run with rakeup. That found, it runs with "ruby server.rb" to run the project on local server.

Example suggestion: 2FA with a type=password field

These sadly exist and they are rather annoying when you are using any kind of password autofill. Specifically, Firefox password autofill is really eager to put a password in these.

Plus they don't let you see the one-time code that will become useless in ~2-3 minutes.

Challenging DOM: dedicated button not always visible

Hi,
some days ago i found your great website. Nice to see that somebody offers
An example application that captures prominent and ugly functionality found on the web. Perfect for writing automated acceptance tests against.

So i started to build some WETATOR Tests (www.wetator.org). With the 'Challenging DOM' page i have faced a problem:
A test assumes the a specific button is available on the page. The challenge usually is to find the correct one. But your page is a bit to random from my point of view. A real application always had a defined state - means a button is available or not.
What i like to suggest:
Stay with the random placement, coloring etc. of the buttons but take care, that always the same buttons (by label) are available (e.g. 'foo', 'bar', and 'qux').
What do you think?

RBRi

Hosting on Heroku or Alternatives?

Hello there! Since Heroku is ending its free tier support, I would like to know the future of this project on Heroku (since it's right there in the URL). Are there plans to upgrade to a paid Heroku account? Or move to a different PaaS provider? I'm more than happy to help out here with configuration or suggestions. Thanks so much!

Retrieve Password button gives Internal Server Error

On the Forgot Password page, clicking the Retrieve password button used to result in going to a new page that displayed "Your e-mail's been sent!" (it didn't send a real email and that's ok). However, now when clicking the button, the page shows Internal Server Error with a 500 status code.

/value on /dropdown's select element returns empty - but only in Firefox

Hi there,

I'm trialling webdriverio against the site, and on the dropdown page when I call getValue() on the element (after selecting the first option), I'm getting empty returned - but only on Firefox. On Chrome and IE it works as expected. I thought it might be a race condition, but a 1sec pause doesn't change the result.

API call:

COMMAND
GET element/0/attribute/value

PARAMETERS
{}

RESPONSE
=>

Test: https://github.com/andrew-fowler/webdriverio-theinternet/blob/master/test/specs/dropdown/dropdown.spec.js#L12

Example Sauce run: https://saucelabs.com/beta/tests/4e608f911d2c4817870135ad76e7b109

I was assuming that I was doing something wrong, but I'm struggling to see it.

Thanks,
Andrew

Hii

Please _ _ give me your choice I will hacker training

Build seems to be broken

I've noticed that Ruby version in dockerfile was higher than expected, generating a fail when trying to build the image.
I've fixed it and tryied to PR my changes.

  1. In Travis CI, build seems to need a lower version of Ruby than the one originally specified. I've unified all of this (Ruby version in Dockerfile, Gemfile and Gemfile.lock, same for Bundler version)
  2. "bundle exec rake" command in Travis job fail for a reason I don't now or master. Then, the build is broken. Can anyone fix it ?

I think the fix should allow PR 66 (#66) to build correctly.

Followed all steps in e2e-tests README and getting unexpected token import error

I ran npm install
I ran docker-compose up
The./node_modules/.bin/wdio wdio.conf.js- should this be in a new terminal (this is what I did)

When running above command in new terminal window, I get this output:

ERROR: Unexpected token import
chrome
/user
(function (exports, require, module, __filename, __dirname) { import { defineSupportCode } from 'cucumber';
                                                              ^^^^^^

Syntax    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at loader (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Module._load (module.js:497:3)
    at Function.hookedLoader [as _load] (/Users/user/Downloads/e2e-tests/node_modules/mockery/mockery.js:111:12)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:246:17
    at Array.forEach (<anonymous>)
    at CucumberAdapter.loadSpecFiles (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:237:34)
    at CucumberAdapter._callee$ (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:137:38)
    at tryCatch (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/node_modules/regenerator-runtime/runtime.js:65:40)

Wrote xunit report "WDIO.xunit.chrome.0-0.xml" to [./report/].
MAC2930:e2e-tests user$ ./node_modules/.bin/wdio wdio.conf.js
ERROR: Unexpected token import
chrome
/Users/user/Downloads/e2e-tests/step_definitions/smoke_steps.js:1
(function (exports, require, module, __filename, __dirname) { import { defineSupportCode } from 'cucumber';
                                                              ^^^^^^

Syntax    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:616:28)
    at loader (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/user/Downloads/e2e-tests/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Module._load (module.js:497:3)
    at Function.hookedLoader [as _load] (/Users/user/Downloads/e2e-tests/node_modules/mockery/mockery.js:111:12)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:246:17
    at Array.forEach (<anonymous>)
    at CucumberAdapter.loadSpecFiles (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:237:34)
    at CucumberAdapter._callee$ (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/build/adapter.js:137:38)
    at tryCatch (/Users/user/Downloads/e2e-tests/node_modules/wdio-cucumber-framework/node_modules/regenerator-runtime/runtime.js:65:40)

Wrote xunit report "WDIO.xunit.chrome.0-0.xml" to [./report/].

I removed the brackets from import {defineSUpportCode} from 'cucumber' to no avail.

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.