I just like to know how does the user can pass the image using http url ?

Asked by Kogul on 2020-05-21

Hi Team,

I had uploaded the image in website and tried copied the link & pasted inside the addHTTP parameter. I'm using ImagePath.addHTTP("https://i.ibb.co/cxSW1tm/textinput.png");. I'm not able to load the using the IMagePath.addHTTP(" ");.

Am I doing anything wrong ? Can anyone here guide me to pass a image using url ?

Thanks.
S. Kogul

Question information

Language:
English Edit question
Status:
Open
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2020-05-23
Last reply:
2020-05-23

This question was reopened

RaiMan (raimund-hocke) said : #1

To the image path one adds folders, that are evaluated about containing a given image.

So in your case:
ImagePath.addHTTP("https://i.ibb.co/cxSW1tm");
find("textinput.png")

Kogul (selvanathan4220) said : #2

 Thanks for the reply Railman I try to replicate the step

ImagePath.addHTTP("https://i.ibb.co/cxSW1tm");
find("textinput.png")

Pattern textbox = new Pattern("textinput.PNG");

Is this the right way to load the image in the pattern constructor ? so that It can be used in Screen class for automation.

RaiMan (raimund-hocke) said : #3

ImagePath.addHTTP("https://i.ibb.co/cxSW1tm");
Pattern textbox = new Pattern("textinput.PNG");

the find() above was only a usage example.

Kogul (selvanathan4220) said : #4

Thanks RaiMan, that solved my question.

Kogul (selvanathan4220) said : #5

   ImagePath.addHTTP("https://i.ibb.co/cxSW1tm");
    Screen src1 = new Screen(); src1.find("textinput.png");
    src1.wait("textinput.png",20); src1.type("textinput","Test");
    Thread.sleep(2000);

  ImagePath.addHTTP("https://i.ibb.co/Y8KZkSB");
  Screen src2 = new Screen();
  src2.find("Open.png");
  src2.wait("Open.png", 20);
  src2.click("Open.png");
  Thread.sleep(2000);
  driver.quit();

Sikuli locating the first image but am facing a issue recognizing the second image. I need two images to automate. Am I doing anything wrong please help.

RaiMan (raimund-hocke) said : #6

ImagePath.addHTTP("https://i.ibb.co/cxSW1tm");
Screen src1 = new Screen();
src1.wait("textinput.png",20);
src1.type("textinput","Test");

ImagePath.addHTTP("https://i.ibb.co/Y8KZkSB");
scr1.click(scr1.wait("Open.png", 20));
Thread.sleep(2000);
driver.quit();

Kogul (selvanathan4220) said : #7

Hi Raiman, really appreciate your reply. instead clicking on open button It's clicking on the same textinput field.

RaiMan (raimund-hocke) said : #8

I made my own test with your images and have to admit, that there is some strange behavior in this scenario.

It does not work as expected - so I accept this as a bug.
I will check and come back.

meanwhile you should work with images stored locally.

Kogul (selvanathan4220) said : #9

Thanks RaiMan, that solved my question.

Kogul (selvanathan4220) said : #10

Okay thanks

Kogul (selvanathan4220) said : #11

Waiting for your reply/solution

Can you help with this problem?

Provide an answer of your own, or ask Kogul for more information if necessary.

To post a message you must log in.