Click on buster captcha solver icon on captcha image via cypress - automation

I am trying to click on the one icon highlighted in the image. I am getting error here I am getting Assertion Error
Timed out retrying after 4000ms: Expected to find element: [title="Solve the challenge"], but never found it.
here is my code
cy.get('[style="z-index: 2000000000; position: relative; width: 400px; height: 580px;"] > iframe').then(($iFrameContent) => {
cy.wait(5000)
const $body = $iFrameContent.contents().find('body');
cy.wrap($body).find(' #solver-button').should('be.visible').click();
cy.wait(5000)

Related

How to listen for layer loading failure

I saw the official error event, but I don't know how to use it; When I am in addlayer, the layer loading fails and the page is blank. I want to listen for error events. How do you use it?
The URL of source is incorrect and inaccessible.
var vector = new ol.layer.Vector({
source: new ol.source.Vector({
format: new ol.format.GeoJSON(),
projection: 'EPSG:4326',
url: url,
strategy: ol.loadingstrategy.bbox
}),
style: new ol.style.Style({
fill: new ol.style.Fill({
color: rgbList[0]
}),
stroke: new ol.style.Stroke({
color: 'black',
width: 1
})
})
})
map.addLayer(vector);
My page is blank and addlayer reports an error:Uncaught TypeError: Cannot read properties of undefined (reading 'ol_uid').
If it is a data loading problem you can listen for these errors on the source of the layer. Depending on the source type the event is called featuresloaderror, tileloaderror, or imageloaderror.
Without some actual code it's hard to help you further.

Background image is not showing Ionic 4

recently I switched from Ionic v3 to v4.
In v3 was easier to add a background image,but in v4 is not working.
:host {
.background-image {
background: url('../assets/imgs/carp.jpg') no-repeat 100% 100%;
}
}
<ion-content class="background-image" no-scroll padding>
</ion-content>
and is giving an error for the image url
After asking the question to the Ionic forum I find the solution for this.The problem was that the path was not correct.Ionic 4 has different method for adding the background image.Here is the solution:
:host {
.background-image {
--background: url('../../assets/gifs/nature.gif') 0 0/100% 100% no-repeat ;
}
}
Have you tried with --background ?
The assets directory path is wrong. Try
:host {
.background-image {
background: url('assets/imgs/carp.jpg') no-repeat 100% 100%;
}
}

Does anyone have examples of Google Street View working on Squarespace using the API?

Does anyone have examples of Google Street View working on Squarespace using the API?
I have been able to use other examples to display google maps (non street view) but when I try to get Google's street view example to work... nothing.
Here is my attempt:
http://keweenaw.squarespace.com/googlemapsapitest
I have this code in my page header code injection
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#street-view {
height: 100%;
}
</style>
<script>
var panorama;
function initialize() {
panorama = new google.maps.StreetViewPanorama(
document.getElementById('street-view'),
{
position: {lat: 37.869260, lng: -122.254811},
pov: {heading: 165, pitch: 0},
zoom: 1
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key= AIzaSyBSlsYgCGP7KfS5doe_q0X9guiJ3WNrfns&callback=initialize">
</script>
And this in a code block on the page:
<div id="street-view""></div>
You've got a number of issues which, once corrected, do in fact generate a working embedded Google Street View on a test Squarespace account.
You have a space at the beginning of your API key, causing it to be invalid.
You have an extra set of double quotes on <div id="street-view""></div>
Your CSS rule `#street-view {height: 100%;} won't work. Briefly put, you'll have to define a height in pixels, like "400px" or a similar 'fixed' unit.
You are loading the API over HTTPS but your site is HTTP. You need to either enable SSL on your Squarespace site or change the API url to http://maps.googleapis.com/maps/...etc. The prior is likely preferred.
By opening your browser's console (F12) you can see the specific error messages and work through them one by one (although, having seen these before certainly makes diagnosis faster).
To get you back on the right track, I would put the following code entirely in a code block on the page, where you want the map to appear. You can adjust width and height via your CSS. Once you get it working, you can experiment (if you choose) with moving your CSS to the CSS Editor and your Javascript to Code Injection.
<div id="street-view"></div>
<style>
#street-view {
height: 400px;
width: 100%;
}
</style>
<script>
var panorama;
function initialize() {
panorama = new google.maps.StreetViewPanorama(
document.getElementById('street-view'),
{
position: {lat: 37.869260, lng: -122.254811},
pov: {heading: 165, pitch: 0},
zoom: 1
}
);
}
</script>
<script async defer src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBSlsYgCGP7KfS5doe_q0X9guiJ3WNrfns&callback=initialize"></script>
Also, note that the code above is using HTTP for the Maps API so that it will work with your current configuration. If you choose to enable SSL as mentioned, you'll need to change the Maps API url to HTTPS.
Here is a working example, using HTTPS. This example will quit working soon.

Unexpected token '.' when bundling stylesheets with MVC 4

BundleConfig.cs
bundles.Add(new StyleBundle("~/Content/styles").Include(
"~/Content/css/test.css"
)
);
_Layout.cshtml
#Scripts.Render("~/Content/styles")
Test.css
body{
font-size: 75%;
color: #232323;
text-align: left;
margin: 0px;
padding: 0px;}
This is what Chrome shows as being loaded giving me a Syntax Error about an unexpected token { :
body{font-size:75%;color:#232323;text-align:left;margin:0;padding:0}
I would've selected Abi's answer for the link he provided, but it was a comment rather than an answer. So, I'm posting this as the answer to ensure this question is marked as resolved.
Basically, the link Abi provided stated that the reason for the error is that the browser was trying to load css as though it was javascript.
I realized right away that I was using #Scripts.Render() and should've been using #Styles.Render() instead.

why display css code in the content in Safari of question2answer system?

I installed question2answer on my mac and i login by Safari and ask a question, after posted the question, i view the question, there is a strange line in the content:
next_pages_container { width: 5px; hight: 5px; position: absolute; top: -100px; left: -100px; z-index: 2147483647 !important; } test question
but it works fine if i use Chrome.
I think this code line is a css code, i don't know why it's display in the content.
Anybody can help me? thanks.
Apparently, it is a bug in "Evernote Web Clipper" for Safari:
http://discussion.evernote.com/topic/26375-help-clipper-injects-clearly-html-into-my-pages/
The clipper inserts the code in all editable areas. The suggested workaround is to disable the clipper.