Trying to figure out how to identify which elements in a list are visible has been quite the challenge for me. The application I'm working with features variable menu dropdowns where each row shows different options based on specific parameters, even thou ...
Upon attempting to access the localhost:3000/items/new link, an uninitialized constant error in ItemsController::Item is encountered. The source of this issue is unclear at the moment. The structure of my Application.html.erb layout is as follows: <!D ...
Currently, I am attempting to execute the following code snippet: @i, price_0, price_1, price_2 = 0, 0, 0, 0 until @i > 2 do if trade_history[@i]["type"] == 2 price_"#{@i}" = (trade_history[@i]["xbt_gbp"]).to_f ##NOT WORKING end ...
I successfully changed the Firefox version I am using to 33.1 using this code. However, I want to make the current version the default without having to add extra code to each script. path='C:\Program Files (x86)\Mozilla Firefox\firefo ...
Trying to deploy a static site consisting of HTML, CSS, font, and image files with Ruby Rack has been a bit challenging. While the HTML displays perfectly in Chrome when running it locally, the CSS assets do not seem to be loading or being applied to the H ...
When working with Sauce Labs, there is a specific :passed option available for reporting the pass/fail status of a test - you can find more information about this at . I'm struggling to understand how to implement this feature in Ruby. One approach I've ...
Trying to implement Selenium webdriver in headless mode but Firefox keeps opening up on my machine despite invoking it. Below is the code snippet I have been working with: @headless = Headless.new @headless.start @profile = Selenium::WebDriver: ...
Seeking help with implementing an AJAX request in a Rails (3.0.3) view using link_to. <%= link_to "like", toggle_author_likes_path(current_author, post), :remote => true %> The plan is for the LikesController#toggle action to render Javascript t ...
I am currently in the process of developing my first application that extracts data from TMDB's API. Initially, I was successful in loading and parsing data from a single URL using the following code: uri = URI.parse("http://api.themoviedb.org/3/tv/#{URI ...
Looking to pass two objects to a template that will be rendered after an Ajax call using Rails 3. Take a look at my controller file below. controller/homes_controller.rb class HomesController < ApplicationController def home @sdf=TSdf.n ...
I am trying to access the page chrome://downloads/ to verify that a file has been downloaded, but it is using Shadow DOM. I came across an article on how to access DOM Elements With Selenium Webdriver. You can read it here. However, the code in the artic ...
Running identical Cucumber Features simultaneously on various machines using the parallel_tests gem I am currently exploring how to utilize the parallel_tests gem in order to execute the EXACT SAME Cucumber Features concurrently on different machines. At ...
I have encountered a similar question to this one before, but I am not satisfied with the answers provided as I am attempting to accomplish something more intricate. Within my web service, I am dealing with list/single objects such as Users, Categories, e ...
This is an example of JSON code containing job and applicant information { "jobs": [ { "id": 1, "title": "Software Developer", "applicants": [ { "id": 1, "name": "Rich Hickey", "tags": ["clojure", "java", "immutability", "datom ...
Hey there! So I'm diving into the world of Ruby on Rails and I've managed to create a form that sends data to an external widget which then returns JSON. Here's what my form looks like: <%= form_for :email, :url => 'http://XXX.X ...
I recently delved into the world of ruby on rails a few days back. My current challenge involves transferring data from html tags to a ruby function using ajax. Below is the error message that has been giving me trouble: POST http://localhost:3000/ajax/o ...
Using selenium-server-standalone-2.18.0.jar. Configured the hub and node on the same host. Executing the client code on a separate host. Observing in the hub console, I notice that one of the nodes has connected with 5 firefox icons. Upon running my clien ...
Consider the following string: html_string = '<span><span class="ip"></span> Do not stare <span class="img"></span> at the monitor continuously </span> ' I am looking to modify the text within html_string by re ...
I'm currently utilizing Selenium to navigate through the process of forking and cloning a repository. However, I'm encountering an issue where I am unable to click on the avatar to access my forked repository (refer to the image link provided). https://i. ...
I am currently facing an issue with a Docker container I have set up specifically for Ruby on Rails. This container is built from a Ruby docker container, and after successfully running bundle install and all other tasks, it encounters an error while tryin ...
When I try to click on elements using a CSS selector, such as: browser.find_element(:css, '.login').click I am noticing different behaviors in various browsers. Here is what I have observed: Chrome (version 35.0.1916.114) - works as intended Firefox (v ...
Just starting out with Selenium Webdriver and trying to set up the basics. I'm using Windows 7, with Ruby 2.1.5, Selenium-WebDriver 2.45.0, and currently Firefox 33. (After encountering issues with Firefox 37, 36, and 35, I found a solution in a Stack Over ...
When clicking a button, an AJAX call is made in my application.js file. It sends 3 data points to the events_controller#check action: //application.js $(document).on('click', "#check-button", function(){ ... $.ajax({ ...
I'm new to Ruby on Rails (RoR) and I have an application in which I am using Ajax with will_paginate, similar to what is shown in #174 Pagination with AJAX - RailsCasts. Everything is working fine, but I have encountered an issue where if I select a page u ...
Currently working with Ruby on Rails 5 and ruby -v 2.5.3, I'm in the process of verifying a webhook, following the instructions provided: require 'base64' require 'php_serialize' require 'openssl' public_key = '-----BEGIN PUBLIC KEY----- MIICIjANBgkqh. ...
I have been assigned a task to work with knockout.js. In my project, I have a model called "employee" with fields such as name, country, and state. However, the issue I am facing is that I am unable to save any changes made during the editing process. Her ...
Currently, I am in the process of learning how to utilize watir-webdriver in ruby for my QA tasks. However, a recurring issue arises when running my watir-webdriver scripts on certain sites - some pages have missing CSS Files. This particular problem seems ...
After spending about an hour trying to figure this out, I am still stuck... The action in my oferts_controller.rb file looks like this: def update_categories @categories = Category.children_of(Category.find(params[:categories])) respond_to ...
I've successfully implemented a search form using the pg_search gem, inspired by Railscast #343. Despite my efforts, the page always reloads on search queries. I attempted adding :remote => true to the form and utilized a respond_to block in the con ...
I have been working on a hybrid application using vuejs and ruby on rails, and I am trying to figure out how to translate the error messages that are generated by the server. While I have managed to translate the titles easily with a method, I am strugglin ...
I am working on several projects that require the use of shared step definitions and page objects in cucumber tests. Rather than duplicating these common elements in each project, I would like to find a way to share them across multiple projects. Has anyo ...
I wish to send the selected drop-down menu value to a controller using ajax panel_controller.rb class PanelController < ApplicationController def insert @selected_city_ids = params[:city] end panel.js.erb $(document).ready(fun ...
Hey there, I'm currently utilizing phantomjs for automation testing. Take a look at the code snippet below: capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs("phantomjs.page.settings.userAgent" => "Mozilla/5.0 (X11; Linux x86_64) ...
I'm currently working on implementing an ajax post request feature in my project. The goal is to have a button on my html page trigger a javascript event listener, which then initiates an ajax post request to receive some text data. However, I seem to ...
Having trouble with invalid selector errors when attempting to locate an element using capybara This method is successful: page.find("#widget_amount_Standard") But I encounter issues when trying any of the following: credit_type = "Standard" page.find( ...
I have a piece of ruby code that I'm trying to convert to PHP : print OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new("sha1"), 'hello', Base64.encode64('bonjour')) The output : 62ac34e5d28563d6a50272d660805d1f8c791e41 This is my ...
As I delve into Ruby scripting for automation frameworks, I've been exploring the combination of Selenium and Ruby. One issue I've encountered is the absence of the elementToBeClickable method in Ruby Selenium. In a script where I attempt to click on an ...
Within my application, I have a button that triggers an action called "method" present in the UserController. This particular action involves executing some specific tasks. def method ***performing necessary calculations and operations*** @my_variable ...
We have a range of technology tools at our disposal, including Java, Python, and Ruby code (and no, we're not Google ;-) ). Any recommendations for a good CI framework to use? Hudson or something else? dwh ...
Creating a command line two-player chess game has been an exciting challenge for me. I've structured it with a class for each type of chess piece and a main board class, which is outlined below: class Board attr_accessor :board, :choice def init ...
I am facing an issue while trying to access a link that appears in a modal or hover. To begin with, I need to hover over the "Your Account" section (refer to the image below). I have scripted this action using the code snippet below: option = driver.find_ ...
My current setup includes: selenium grid 2.53.0 hub and node for Internet Explorer; Jenkins; Internet Explorer 11. However, when attempting to execute a build for IE using a batch command with the variable BROWSER=ie, I encounter the following error: ...
Currently, I am in the process of integrating an API for online payments. The API is designed using PHP code, but my website operates on Ruby on Rails. Therefore, I need to convert the PHP code to Ruby. Below is the PHP code snippet: $merchant_id = &apos ...
Encountering the following error message: unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) when executing this code: require 'watir-webdriver' require 'headless' headless = Headless.new headless.start begin ...
I recently started learning AngularJS and Rails, and I attempted to develop a Rails application incorporating AngularJS. Currently, I am looking to make a POST request to send data and insert it into the database. In the Activity Controller: def create ...
I am having trouble sending JSON data with an image included. When I send the request without the image as a Bitmap, everything works fine. But when I include the image in the JSON, the server returns an error. This is how I am sending the request: R ...
Can someone tell me the type of response an action controller will give before the instructions? respond_to do |format| format.html{ ... end Is it possible to determine this beforehand? Many thanks! ...
Here are some of the classes I have: class Product attr_accessible :name, ... has_many :images end class Image attr_accessible :image, :position, :product_id, :title belongs_to :product In this case, I am trying to achieve the following action: def ...
When using Selenium WebDriver, I am attempting to click on the Manual Testing option within the Testing menu on . The Manual Testing option is displayed after hovering the mouse over the Testing option. To achieve this functionality, I have implemented the ...
Is there a way to set a default download path in Selenium when using headless chrome in Docker? # docker-compose.yml services: chrome: container_name: chrome image: selenium/standalone-chrome-debug:3.9.1-actinium ports: - 4444:4444 Below ...
When I click on a link "link_to" in my rails app, I am attempting to trigger a JS file. To confirm that the asset pipeline is functioning correctly, I conducted a test with: $(document).ready(function() { alert("test"); }); The alert successfully po ...
I'm currently facing an unusual problem with selenium. The following ruby code snippet: page.all(:xpath, "//table[3]//tr[last()]//td") Successfully retrieves all the cells of the last row from the third table on a webpage. In contrast, this python code ...
As someone who is new to Ruby on Rails, I am currently facing a challenge. I want to extract data from specific fields in my database and utilize them for styling purposes. For instance, within my 'Student' database, there are height and width f ...
Recently joining a new company, I am now running my selenium tests using a Ruby framework. Working across three screens, I added a browser step to move the window to my leftmost screen before maximizing it: @driver.manage.window.move_to(-1800, 1500) @driv ...
I launched a trial Grape REST API and now I'm attempting to test it using Swagger UI. The issue arises when Swagger UI loads the API specification by adding parentheses to the suffix: Unfortunately, this results in a 404 error because the (.json) suffix ...
Trying to set up SASS with Grunt and encountering some errors. Ruby, SASS, and Grunt are all installed in the path with the following versions: node: 0.10.20 npm: 1.3.11 grunt-cli: 0.1.13 grunt: 0.4.5 sass: 3.4.4 Package.json: ...
I've been researching nested attributes in Rails, and I came across a gem called cocoon that seems to meet my needs for distributing forms with nested attributes. It provides all the necessary implementation so far. However, I want to explore adding existi ...
Utilizing the "ajax" function within the script enables communication with the server by sending post or delete messages. The javascript code that includes ajax is responsible for dynamically adding checkboxes to the page. How can we ensure that the create ...
In my programming project, I have an array called dates with 31 items (shown in a shortened form below) Tuesday 8, November Wednesday 9, November #etc. Also, there is a hash named movies with 31 entries, each containing movie names and showtimes (abbrevi ...
When using the ERB link_to helper method to generate a hypertext link to an individual article, I am encountering an issue where the link appears as clickable in the view but is not actually clickable (the cursor does not change to a pointer). I have atte ...
Utilizing React JS for my application development is a current focus of mine. I have a solid understanding of how to import images within the client/browser folder structure. For example: import maze_text from '../../mazes/images/maze_text.png'; My aim ...
I came across a question that was previously answered for Java (Get chrome's console log) However, I am currently working with Ruby bindings and I'm curious if it offers similar functionality? I have checked the Ruby source code but couldn' ...
Within my application, Users have the ability to recommend other Users' profiles seamlessly. The functionality related to models and associations is working perfectly, as I am able to identify which users have recommended the current_user's profile by util ...
I need some help with a filtering issue related to sign names. I am trying to merge the content together if there is more than one name of the sign. You can refer to the image attached for better clarity, where I have two server names but I only want to di ...
Encountering a Catch-22 situation with jQuery in my Rails app - when I include jquery_ujs, it pulls the wrong URL from Rails during execution, leading to quiet errors when attempting to access non-existent URLs on the server. However, if I omit jquery_ujs ...
Currently working with Ruby on Rails 4 and incorporating the RABL gem into my project. I am seeking a way to reuse templates by rendering the show.json.rabl view from the index.json.rabl while following the standards outlined at jsonapi.org (source: RABL d ...
Locate the following snippet of HTML code: <table id="supplier_list_data" cellspacing="1" cellpadding="0" class="data"> <tr class="rowLight"> <td class="extraWidthSmall"> <a href="/aems/do.list"> Cdata </a> ...
My webpage has a unique feature where one side refreshes when a button is clicked on the other side. I am curious to see if the site will malfunction if I click the buttons too quickly, not allowing enough time for the right side to fully load. Currently, ...
I'm feeling a bit lost trying to figure out how to serialize and deserialize a simple line of code. I've searched for answers but nothing seems to address this specific issue. Can anyone help me with the following: JSON.parse("É".to_json) JSON: ...
In the scenario where a checkbox is checked, how can the page be automatically redirected to @habit, simulating the behavior of clicking a submit button? habits/show <% if @habit.current_level_strike %> <div class="btn" id="red"> <l ...
A problem has arisen with the Ruby Selenium script I am running in parallel. The issue occurs when attempting to send text input through send_key on a webpage while using the Chrome browser. Selenium::WebDriver::Error::ElementNotVisibleError: element not ...
I've integrated font-awesome-rails into my Rails project. When a user clicks the submit button on a form: The submit button should display an animated font-awesome spinner and change text to "Submitting...". The button must be disabled to prevent m ...
Would it be feasible to implement the ActiveRecord Callbacks before_create after_create before_save after_save before_destroy after_destroy in order to showcase notifications to the user using jQuery? Could someone possibly share an example?? Appreci ...
I am a beginner in HTML and RoR. I am trying to include a button inside a table that will submit a hidden form. However, I am facing an issue where the button is not showing up in the generated HTML. <table class="centerBox"> <h3>Search Resu ...
I have been trying out new things lately, specifically focusing on selenium for the past 4 months. Can selenium be used for performance testing? If so, how can it be done? I would appreciate any information provided. ...