I am getting the error
Selenium::WebDriver::Error::UnknownError: unknown error: Function already created: concat.
(Session info: chrome=29.0.1547.62)
(Driver info: chromedriver=2.2,platform=Windows NT 6.1 SP1 x86_64)
when running a Cucumber test via Jenkins, command-line or from RubyMine.
I am using Watir webdriver, Chromedriver 2.2, the webdriver-user-agent Gem (to set the user agent to a mobile user agent). The error occurs after getting to the PayPal sandbox site and executing:
assert #browser.link(:class=>"scTrack bn:payWithCard").present?
or:
assert #browser.text.include?(str)
I have tried asserting text exists earlier on in the test and it works fine. Maybe it has something to do with the redirect that occurs during the PayPal page:
Please wait while we transfer you to PayPal
If you have not been connected within 1 minute click here
There are no definitions for anything called concat in our code. I have 63 other tests with the same initialisation code, mobile user agent etc. and none of those throw exceptions. I doubt it matters, but I'm using Windows 7 Professional 64-bit.
Related
We use Elastic Search throughout most of our app, and up until today, we've never had issues with testing those features via Cypress. One feature in our app is a calendar tool that populates a list with appointment dates and times. When accessing this calendar tool manually via Chrome, the list correctly populates without issue. When opening this tool during a Cypress spec, and ONLY during a Cypress spec, the results fail to load. The console spits out an error that just says "[useElasticsearch] incorrect header check" with no other information. In checking the network tab, we can confirm that the ES query is performed and returns results successfully, but the page is not updated with those results.
Note that this is NOT the result of a cy.request(), this error occurs through standard UI navigation. This issue, as I mentioned, ONLY occurs when testing via Cypress. Due to this, we are hesitant to make changes to the backend of the app, since it works perfectly fine in all other scenarios. This has been reproduced on Cypress versions 5.1.0, 6.1.0, 7.1.0, and 8.0.0. This has also been reproduced in Cypress when using the Chrome, Electron, and headless browsers.
Has anybody else encountered this issue?
I am using this official Appium page http://appium.io/docs/en/writing-running-appium/default-capabilities-arg/
and I want to override the capabilities which are provided in spec_helper.rb this way
rspec --default-capabilities spec/test_data/new_caps.json spec/cli_test/cli_test_spec.rb
but it is giving me error invalid option: --default-capabilities.
Appium server already running in the background.
What am I doing wrong here?
I am running my tests on headless chrome browser and need to get the user agent of the headless browser.
For a Chrome browser, that is not headless I use this code to get the user agent:
page.execute_script("navigator.userAgent"); ==> which works as required
But for a headless browser this doesn't seem to work. Is there a way to get the userAgent?
PS: I use ruby, capybara in my framework
Your issue is that you're using execute_script when you need to be using evaluate_script because you want a response. That being said, your code shouldn't have worked without headless set either so I'm not sure what version of Capybara you're running.
page.evaluate_script("navigator.userAgent")
This question has a few more details, in addition to the report here: AWS Lambda: Calling the Invoke API failed with message: [object Object]
When I try to invoke my Lambda function, by clicking on "Test" button, I see the error reported.
Issue seen on browser: Firefox Nightly 64.0a1 (2018-10-15) (64-bit), on a Windows 10 system.In the browser console, I see this error:
TypeError: asm.js type error: Disabled by 'asmjs' runtime option rusha.min.js
In the Network tab, of the Firefox dev-tools, I see that the invocation returns with a 403 error. The response is :
{"message":"The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details."}
Everything works as expected on Microsoft Edge, and Chrome browsers.
Asm might be a red herring, but I can believe AWS might well be using it to speed up their signing. This fits, as the error you're seeing occurs when you try to do something on the AWS Api without the v4 signature being correct.
I notice you're using a nightly build of firefox, so you might well be subject to a known bug &c, or asm.js might be disabled for that platform.
Following the error, I suggest you try going to about:config (to change your firefox configuration), and set javascript.options.asmjs to true.
Failing that, you might have to get off the nightly build or raise a bug report.
This was an issue / bug, that has since been fixed in Firefox Nightly (and should flow into Firefox standard release).
The details of the issue are here: https://bugzilla.mozilla.org/show_bug.cgi?id=1499136
In Firefox's about:config, the key
dom.xhr.standard_content_type_normalization is now set to false by default.
Please help me understand the possible causes of an 'x-method' missing error when using HttpDelete.
There is a Windows 7 user using Chrome 23 but HttpDelete isn't working. This test website http://www.mnot.net/javascript/xmlhttprequest/ reports the following for the "What Methods Are Available?" section:
DELETE: fail (Test execution problem: expected response header field ('x-method') missing.)
The machine also fails to use DELETE when using a custom web application accessing a REST service using jQuery ajax. It reports a 405 exception for any DELETE requests. The application works fine for other machines with the exact same actions.
Information about what could cause the delete verb to fail under these circumstances is appreciated.