Hot answers tagged

2

Use contains() or starts-with() function in xpah : Solution : With contains : //div[contains(@id,'post-body')]/div[1]/form[1]/input[1] With starts-with : //div[starts-with(@id,'post-body')]/div[1]/form[1]/input[1] Let me know If any query.


2

I would go with rspec using capybara as effectively the next 'layer' down. Your existing experience should make it relatively easy. Make sure your UI tests are backed with a reasonable amount of model and controller tests. How much and what to test vary from place depending on what your built, your adherence to a rest model, etc. Try to put logic in models ...


2

Selenium is a software library to locate elements on web page and interact with them. To deal with images, you need to use different library. Selenium can provide screenshots (images) but you need to use something else to work with such images. As a programmer, you need to master more than a single library, and learn to use right tool for the job.


2

I think you should continue with your script using Selenium for existing functionality. Once your all sites development work is completed, I mean once your all modules are ready then It's easy to move Selenium script in to Cucumber script. So my opinion you should continue scripting with as usual Selenium for existing functionality, because It's easy to ...


2

I think it depends largely on: whether this is a standalone testing app or part of a rails application. if part of a rails application, which rails version was originally / currently used. In rails applications it's now usually placed in spec/support/capybara.rb:, e.g. Capybara.javascript_driver = :selenium


2

Firstly, you should separate your process from your technology stack. Evidently, you've defined a process for yourself: you'd like to write tests that you can execute manually to verify certain things and that you can later use in unattended runs to verify those same things. Now you need to find a technology stack which will let you do this. Now, given your ...


1

You cannot do that with just Selenium, as @Peter-Masiar mentioned, but you can look at the Structural Similarity method. Additional link. My company has been using this method quite a lot for testing.


1

Capybara is a Ruby framework used for emulating a users behavior in a browser. You can use it with whatever test framework you wish, RSpec, minitest, etc. When using Capybara, as long as you stick to its API (no calling of methods directly on the driver) you should be able to switch between different drivers relatively painlessly, using the selenium ...


1

One non-selenium tool we use (we use the paid version) is GhostInspector which has several options for screenshots including comparing by % difference and by css selectors to target areas.


1

Use Sikulix API. Sikuli is a library that will help you compare two images or recognize images when they are displayed on your screen. After the said image is displayed, you can click on the recognized image. Download Link: http://www.sikulix.com/ Go for the download link: https://launchpad.net/sikuli/sikulix/1.1.0 Download sikulix-setup-1.1.0.jar Run ...


1

You can calculate hash of images and then compare the hashes for equality. SO has a question on calculating hash


1

form.form-horizontal > div:nth-child(3) > div > input I suggest spending 20 minutes here



Only top voted, non community-wiki answers of a minimum length are eligible