Can´t open an internal page in Cypress Chrome - cypress

We have an cypress issue that is similar to the issue described in "https://github.com/cypress-io/cypress/issues/850". The reason for why I am creating a new post is that I have done some changes in the environment which makes this work but only after the first fail and then manually click on the failing URL.
Test1:
Default cypress\plugins\index.js file (no changes)
lauch the internal page cy.visit('xxx')
Error 401.
Click on the link below the error text. Another tab is opened and message UNAUTHORIZED is shown.
Paste same URL in default Chrome->works fine.
Test2:
Modify the cypress\plugins\index.js: args.push('--proxy-pac-url=xxx') (I have tested other arguments but this is the only one that makes something different)
Lauch the internal page cy.visit('xxx')
Error 403.
Click on the link below the error text. Another tab is opened and the page is shown CORRECTLY.
This is the reason why I post this new message. I want to ask if there is a way to get Cypress to open the page automatically via cy.visit() in the same way as when I click on the failing URL and it opens the page in the same cypress browser but just another tab?

Related

Downloading from object URL always fails the first time in Firefox

When opening an object URL in Firefox the file's content is correctly displayed (in the PDF viewer), but "Save page as..." cannot download the blob. The download list in Firefox lists the file as "failed". Clicking on "retry" is successful.
The same approach works successfully in Chrome.
There's no backend involved (at this point). The blob is correctly retrieved in the frontend and displayed, but only on retry is able to download.
The object URL hasn't been revoked (and I can still see an entry in the session storage for the blob. That it always seems to work the second time seems to point to a timing problem to me, but I wouldn't know where to see what failed here.
window.open(URL.createObjectURL(blob))
where the blob was created from the backend's content using Angular's HttpClient:
getContentFileById(id: string): Observable<Blob> {
return this.http.get(`${this.documentUrl}/${id}/content`, {
responseType: 'blob'
});
}
This is both with current Firefox (78.0.2) and Firefox Developer Edition (79.0b9) on macOS Catalina (10.15.5).
It occurs with a file that had the original content disposition attachment or inline although I suspects that's lost anyways when it's converted to a blob.
UPDATE:
Here's a simplified minimal example, where I see the same behavior. I couldn't figure out how to create a Blob directly from an ASCII binary representation, so the example uses a base64-based string. The basic idea to open a created object URL remains the same though:
http://jsfiddle.net/4m8onzu6/9/
Unfortunately this example only opens as PDF file in Firefox, while my actual code also works in Chrome...
I noticed that selecting the normal download button (which most users probably use) works. It's only when you try "Save Page As..." that it first fails, but can download the file on clicking "Retry" in the Downloads list...

console print some error when I deploy my blog to my website

when I finished my vuepress blog and deploy to my website. chrome console always print out the following error message . it's doesn't seem to affect function. but I want to fix it . how can I do ?
console error
Do you trying remove a node of DOM manually?
i.e. document.getElementById("any-element").removeChild("other-element");
You shoudn't to do this, because the Vue is resposible for handling DOM.
But if you need do something like that, you must to verify if the window object exist. Because when you build the Vuepress site, Node.js do a prerender of all HTML files and in this context the window object doesn't exist.

I am getting Ajax I/O error while clicking on any button, drop down in my script

The web application on which I am working has an authentication mechanism. To access this I need to provide some user id and pwd. After entering credentials when I try to select any drop down value or try to navigate to another page using pagination, getting Ajax I/O error with error code 502. Its not reproducible manually. Only via selenium script I am getting this error.
I have tried alert method, but its not useful. On this Ajax alert pop up I am getting only OK option on which if I tried to click its not selecting the desired value.
I want to select value from the drop down without any Ajax error.

Script issue in J Meter while recording script using 'BAD BOY' tool

Chrome Settings
HI All - I am new to J meter and i am continuously getting the script error while recording the script using bad boy tool.
I tried with the changing the chrome settings as above:
but still am getting the same script error.
I hope when you normal browse the application then your are not getting the error.
So, if you are recording and getting pop-up but you can proceed further then record your action and suppress the javascript error from Preference>Automatically handle>Javascript Error Dialogs.
You can also disable recording javascript request from Preferences>Recording option. Since, jmeter work on request and response and not GUI level so javascript is not supported. It does not actually parse/execute JavaScript coming with the loaded page.
Also, try the option you have shown to disable script in IE browser and then try with chrome.
Hope this helps.

Watin - problems with page redirects

I'am trying out Watind. I am having problems with a Login page og the applciation, which automatically redirects to the main page (without any user intervention). It looks like WatiN has troubles with this. Wehn I Invoke:
IE ie = new IE("http://localhost/MyApp/Login.aspx");
The browser opens, it redirects to "Main.aspx", but Watin times out with "Timeout while Internet Explorer state not complete". While debugging, I have found out, that method IEReadyStateIsComplete. When trying to evaluate ie.ReadyState, its is getting the following exception from ie: "The Object has disconnected from its clients".
I am using IE8.
Any ideas how to handles fast redirects?
Matra
It looks like the problem was related to UAC feature of Window 2008 server. I'have restarted VS200 as an Administrator and now it works OK.

Resources