Skip to content
Advertisement

Tag: src

change image src using selenium webdriver

I have a project in where I want to upload image to image tag in web page using upload box , I can do that by selenium web driver by opening the upload box then writing the image path then pressing open .I tried to ignore the upload box by changing the image attribute “src” but I could not do

blob URL as audio src

After I get audio file from input, I make it to url using ‘URL.createObjectURL’. And the url looks like ‘blob:http://127.0.0.1:8080/52090eca-64a0-4262-aeda-34f9c62257b1’. However, if I put this url to the src in audio tag, this shows nothing. Answer HTMLAudioElement class contains .play() function to open the sound, you need to call it example:

Image src won’t change using JavaScript

I feel like I have this right, but for some reason, the addEventListener isn’t functioning how I want it to. When I try to change the img.src below, it still only shows the ‘images/expand.jpeg’ img. I have confirmed that the path to the image is correct, as it does show the ‘images/collapse.png’ when I change the button’s original src to

Advertisement