I know i am asking a stupid question here everyone can figure that out. But believe me i really tried hard to get it but unfortunately not got it.
So i Just want a simple thing i want to click on a web form text field by its ID or Name or class. And i dont want to press TAB so how can i do that? I want same for the button or any web form field.
Click on the web form textbox or button with ID or Class
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
The easiest way to do this is first to install webrecorder then you can use the IE_ClickTag function which can be given the ID or class of the element.
alternatively use IEGetTags to first get an array of all tags matching tag type and then loop through them to locate the one of interest and store the index and use IETagEvent to click it.
alternatively use IEGetTags to first get an array of all tags matching tag type and then loop through them to locate the one of interest and store the index and use IETagEvent to click it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Thanks!! But not working with Firefox
Thanks for your kind reply it works for me.
But what when i want to work with Firefox or some other browser? as i am not getting its accessibility there.
But what when i want to work with Firefox or some other browser? as i am not getting its accessibility there.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Our functions work only with IE as they depend on IE's API/Document Object Model. If you wish to automate Firefox/Chrome you would have to use "user-level" automation.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 1
- Joined: Fri Aug 03, 2012 9:27 pm
Re: Click on the web form textbox or button with ID or Class
Hi Marcus,
I'm also trying to work with Chrome, trying to send Space or k yo play pause youtube video, but it is not working, also tried to send a mouse left click, but it is not working.
Can you please elaborate on "user-level" programming?
I'm also trying to work with Chrome, trying to send Space or k yo play pause youtube video, but it is not working, also tried to send a mouse left click, but it is not working.
Can you please elaborate on "user-level" programming?
Re: Click on the web form textbox or button with ID or Class
The closest that I got to automate Chrome would be to use shortcut keys with the following code:
Which works great to send "k" to a youtube video, pausing and playing it - so some functionality (limited) can be done this way.
Code: Select all
GetWindowHandle> - Google Chrome*,hWndParent
SetFocus> - Google Chrome*
FindObject>hWndParent,Chrome_RenderWidgetHostHWND,,1,hWnd,X1,Y1,X2,Y2,result
ObjectSendKeys>hWnd,VK75