Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find image not always correct
#1
Hi,

I use a macro where I have to use the find image function. This because it is in a chrome window and I don't know how to find another way to select the button. But this works perfect at my computer but on another computer it doesn't find the image? They are the same... same website, browser etc.

Any ideas to solve this?
#2
Maybe different zoom level in Chrome.
Or different text size (DPI). Look in Control Panel.
Also try "Allowed color difference". Look in dialog "Find image".

Or instead use accessible object functions. If object capturing does not work, upgrade QM. Now it is 2.4.2.2.
#3
Hi,

i tried it with the accessible objects. On one computer this works amazing Smile but on others it cannot find the object or nothing gets done.

int w52=wait(3 WV win("My website - Google Chrome" "Chrome_WidgetWin_1"));
Acc a20.Find(w52 "TEXT" "" "a:id=NewPostForm_pagetext" 0x3004 3)

Is there something wrong or can i do something to make this work ?
#4
Try to capture the object on each computer separately (with dialog "Find accessible object"). Does it create the same code?
#5
Hi thanks for the response,

When i try it here, i get this:

int w72=wait(3 WV win("My website - Google Chrome" "Chrome_WidgetWin_1"))
Acc a23.Find(w72 "TEXT" "" "value=test[]state=0x100004 0x20000040" 0x3004 3)

the 'a:id=NewPostForm_pagetext' is not detected. it is replaced by the text in the messagefield.
#6
What is page URL? I would test.
#7
Hi,

You can use this link: https:// it's about the reactionfield in the bottom.

Thanks for your help so far!
#8
I get with "a:id=NewPostForm_pagetext".

It could depend on Chrome version. The a: attributes may be missing on old Chrome versions or on portable Chrome.
Try to create code without a:. If the edit field cannot be identified reliably, try to capture an adjacent/near object (eg Reageer op dit bericht) and use Navigate.

Macro Macro2461
Code:
Copy      Help
int w=wait(3 WV win("Chrome" "Chrome_WidgetWin_1"))
Acc a.Find(w "h2" "Reageer op dit bericht" "" 0x3001 3 0 "next2 first")
#9
Thanks!

I will work with this!

Thank you for you time!

Greetings
Sonic


Forum Jump:


Users browsing this thread: 1 Guest(s)