How do you check for a background image in nightwatch? How do you make sure a background image is correctly loaded? Background image is loaded using css.
Hope this helps:
browser.waitForElementVisible('.someSelector', 15000)
browser.expect.element('.someSelector').to.have.css('background-image').which.equals('url("https://www.someimage.com/image1.png")');
Related
Good evening guys, I wish to change some image in swiper slide when resizing the screen. For example when the breakpoint are more than 1200px, I have some image when I resize the screen in responsive mode, I've another image.
I do this in script js or can I do this from css and html?
Thanks to everyone!
I have a blog hosted by Blogger with a custom template: http://www.drugchannels.net/
Images uploaded to the blog are hosted at X.bp.blogspot.com (where X is a number). Examples:
https://1.bp.blogspot.com/-Jwy2VQYRIEA/WqmwvsA07WI/AAAAAAAATA4/jWVcEts1h1Y4IXM0hD0njUhSmQ2AZPnxQCLcBGAs/s1600/Specialty_vs_Retail-2014_vs_2017.png
https://4.bp.blogspot.com/-O4S9ps4u67k/Wk0yhTEuV-I/AAAAAAAASUE/5tPedr-p7_4kedNYU4RY711l6K3maokiQCLcBGAs/s1600/DCI-Copay_Accumulator-03Jan2018-CORRECTED.png
I want to have a white background when the image is clicked. (The images look fine on the site itself. This is not a problem with the blog's background, which is set to be solid white.)
Using the Inspect option in Chrome, I see the following information
The body formatting (background: #0e0e0e;) does NOT appear anywhere on my blog or in my template.
How can I fix?
Thank you!
P.S. I have 10 years of legacy posts with images, so I need a global solution that changes the background to white for all images posted to the blog.
Wrap the image in a div and set the background color of that div with css. That should work
.divclass:active {
background:#FFFFFF
}
If you are opening the images in a new tab or window then your only option is changing the background of the images yourself with a photo editor. If you're just trying to give the user a full size view of an image when they click it you could use javascript/jquery and have a full size div with a background and an image pop up in full screen without sending them to the linked image. Theres probably quite a few jquery plugins that will do this with minimal coding knowledge, just google it.
Thanks, Riley.
I can't go back and edit hundreds of images, so the photo editor option won't work.
But based on your suggestion, I used the following solution:
1) Enabled "Showcase Images with Lightbox" on blogger
2) Added CSS from this page (http://www.howbloggerz.com/2016/05/how-to-customize-blogger-lightbox.html) with no background image and background color set ot white (#ffffff).
Downside is that charts/images now pop up on same page rather than opening in a new tab.
Thank you!
I haven't really been able to find anything that shows how to change a background image in inspect element.
My background image is set like the following:
How can I change this background image in inspect element?
Paste the image link in like:
background-image: url(http://vignette4.wikia.nocookie.net/someordinarygamers/images/a/a1/Sanic.gif/revision/latest?cb=20150624143958)
Then you need to uncheck the color of the background. It should work then.
You should be able to click the background-image property value, "url(/images/rate.jpg)", and change the url to the desired image.
I want to show a preloader on my website before the content loads,However when i choose a animated preloader image with transparent background the edges look very jagged. How to I modify the image or is there a way to have a transparent background to animated gifs?
I am using the preloaders from preloader.net
The first and probably easiest option you have is to use spin.js. “It dynamically creates spinning activity indicators that can be used as resolution-independent replacement for AJAX loading GIFs.”
If a script is not an option or you want to have a different spinner you have to create a .gif with no anti-aliasing that is bigger than the spinner you want to use and scale it down with html.
Original spinner without edges (without anti-aliasing, therefore it has a pixelated edge):
But if this spinner gets scaled down, it looks nice:
Be sure to use
img {
-ms-interpolation-mode:bicubic;
}
to make it also look pretty in older IEs.
You can use a site that helps you generate your spinner. A great option is :
loading.io
So I have an image (GIF) with a blueish background and a circle (which i want to keep), I would like to remove the blueish background and ( or show the origin color of the back ground it sites on or make the background of the image totally transparent. )
Thank you .
This is GWT 1.6
GIF supports transparency also, open it in a image editor(not paint, it sucks) and select the background using the magic wand tool. Press delete and you're done!
PS: save it as GIF file if you have to..
This has nothing to do with GWT. The solution is to use PNG image format. PNGs allow you to specify a transparent background.