Please let me know how can I easily switch between Webrat and Selinium? Selinium takes longer as it simulates by opening the real browser. In some cases I do not need this and just Webrat, showing results in command line is just fine and faster. Is there anyway to configure cucumber to switch between Webrat and Selenium??
How to easily switch between Webrat and Selenium?
376 Views Asked by amj At
2
There are 2 best solutions below
1
Tyler K
On
There are a number of ways to accomplish this. But the easiest is:
Tag individual files/Scenarios with @selenium to invoke selenium and then use @javascript as your default driver which uses webrat as the default driver, if I recall correctly.
This will only call Selenium when you invoke it directly.
Related Questions in SELENIUM
- Can't get Selenium element
- Trying to find HREF from table with Selenium in Python
- Python | How i get the link of products that doesn't have href with selenium
- Selenium works only when I'm connected to a remote server
- Logging in automation using Selenium requests / responses- why it wont work?
- Why can't I scrape data from etherscan
- TypeError: 'SwitchTo' object is not callable
- Why driver.get doesn't work in Python Selenium when using Profile
- Trying to fill out an online form using selenium but it can't find the element
- Targeting Accept Policy With Selenium
- Python Selenium - Select Options not returning all the options
- Spraping data from a table is slow but uncertain why
- Unable to convert byte[] image to base64 using cucumber scenario api's - java selenium
- Selenium WebDriver - google account login problem using python
- Click on login button using Selenium
Related Questions in CUCUMBER
- Problems running both JUnit tests and Selenium/Cucumber tests at the same time
- How to parse data into cucumber's variables in feature file?
- Getting NullPointerException when trying to use FindElements to read all elements
- is not a valid Cucumber report! String length (20054016) exceeds the maximum length (20000000)
- Parallel testing with cucumber, selenium and junit 5
- Is there a way to not close pages for specific tagged scenarios in Cucumber-Playwright?
- Only run some cucumber tests in parallel and run the rest sequentially using gradle tasks
- How do I mark my Jenkins build status based on cucumber scenarios pass percentage?
- Facing issue while running Testcases from runner class in the Cucumber with ObjectFactory with Latest Version of Cucumber
- Cucumber API for listing/run features/scenarios/tags
- Generating Cucumber + Selenium scripts(feature + Backend Code) Using exiting production code(Maven project)
- Java WireMock defining stubs fail in multithreaded tests with Cucumber parallel execution
- how should i organise my files in my project based on best practices?
- Cant find @CucumberOptions
- Run only a certain scenario using maven
Related Questions in WEBRAT
- cucumber test in rails application does not seem to be submitting a form to log a user in
- Receiving an 'undefined local variable or method' error on a visit method, when trying to use webrat for my cucumber tests
- I am trying to run the integration testing in Ruby on rails using capybara but when i run the test i am getting a java script error
- Simple selector matching in cucumber/webrat
- Tools to write Integration tests with rspec 1, rails 2.3, ruby 1.8.7
- How can I use Capybara with Cucumber-jvm and Java?
- Switch between a headed and headless server when integration testing with capybara
- WebRat page not loaded (you are being redirected)
- 'visit *_path' doesn't work while testing user model
- New to Rails -- Webrat methods not working in integration test
- Undefined Method 'visit' after migrating to capybara from webrat in rails 3.2.12
- Solve (Capybara::ElementNotFound) with simple form and cucumber
- cucumber + capybara step definition - sending POST requests
- Making sure a box is checked with Capybara?
- Rails webrat gem - render method missing
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Capybara is designed to be a webrat replacement, and it supports multiple back-end drivers (including Selenium) and you can switch between them, even during a test run. For example, maybe you want most of your tests to run fast but some require ajax testing / cross-browser testing and for those you can switch to Selenium.