question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to see images on IDE while using custom path for images and getting the error while using absolute path for images

See original GitHub issue

Issue Description

Remove any following parts if does not have details about

Unable to see images on IDE while using custom path for images and getting the error while using absolute path for images

I am facing two kinds of issue, Whenever I use custom path for images which I am going to use in a script.

I dont want to store all images in .air folder and i want to use one custom path. So that I can use same image for multiple scripts.

  1. When I declared path for image library in script, for e.g.suppose C:/ABC/ABC path for image library, (in this folder I stored all the images)

I use the following format for WAIT or TOUCH action

for example:

image_path = C:/ABC/ABC

touch(Template(image_path+ “killapps_icon_homescreen.png”, threshold=0.8, target_pos=5, rgb=True, record_pos=(-0.392, 0.531), resolution=(1440, 2560)))

This syntax works but then I can’t see image on the airtestIDE screen

Also whenever I reopened this .air file in airtest IDE, the (") double quotation mark disappeared which present after .png text

  1. Another problem is I can’t use absolute path for images. like for following sample code -

touch(Template(absolute_path_of_image, threshold=0.8, target_pos=5, rgb=True, record_pos=(-0.392, 0.531), resolution=(1440, 2560)))

Is there anything wrong with above syntax?

Kindly check images for more information.

Screenshots i2 i1

python version: python2.7

airtest version: 1.0.00

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SUDARSHANCHAUDHARIcommented, Oct 17, 2018

Hello @yimelia, Thank you for the reply. Yes issue has been fixed and now I can use the mentioned syntax

But can you tell me about images I can’t see image on the airtestIDE screen like when used default syntax.

How can I display the image also on Airtest IDE?

image

If you want I can create new issue for this and we can close this issue. let me know thank you

0reactions
yimeliacommented, Oct 18, 2018

hi @SUDARSHANCHAUDHARI , sorry, AirtestIDE use a fixed image name template (tpl\d+.png), only the image which is matching the template and in the .air directory will be displayed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image source folder not loading - SAP Community
I am using the layout editor for the /view/xxx.view.xml and in the image 'src' input I have given the path for the image...
Read more >
Webpack 4 - unable to load images with absolute path in src ...
1 Answer 1 · 1) Import all the possible files (Be sure to use the correct path here) // includes.js import './src/images/icon1.gif'; import...
Read more >
How to Use Icons - Creating a GUI With Swing
This Swing Java Tutorial describes developing graphical user interfaces (GUIs) for applications and applets using Swing components.
Read more >
Images in Xamarin.Forms - Microsoft Learn
Images can be shared across platforms with Xamarin.Forms, they can be loaded specifically for each platform, or they can be downloaded for ...
Read more >
Question #700324 “Fail to locate the ImagePath in java”
Hi , i tried to locate the image path using ("someClass/images"), but fail to add it in the image path. Only target/classes folder...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found