dropdown selection

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

dropdown selection

Post by techimac » Fri May 04, 2018 6:29 am

https://badoo.com/signup/?f=top

not able to select text from drop down Day list box even with EVENT mode

windows 8.1
Firefox 47
iMacros 8.9.7
Available for custom iim, javascript iMacros scripts
techimac
Posts: 482
Joined: Fri Feb 20, 2015 9:27 pm

Re: dropdown selection

Post by techimac » Fri May 04, 2018 6:35 am

Code: Select all

tag pos=1 type=span attr=class:select-field__label-text
tag pos=r1 type=span attr=txt:03
just clicking, not selecting
Available for custom iim, javascript iMacros scripts
User avatar
thecoder2012
Posts: 446
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: dropdown selection

Post by thecoder2012 » Sat May 05, 2018 9:23 am

techimac wrote:

Code: Select all

tag pos=1 type=span attr=class:select-field__label-text
tag pos=r1 type=span attr=txt:03
just clicking, not selecting
Example (only few fields) with Javascript and Keyboard:

Code: Select all

var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindowUtils);
iimPlayCode("URL GOTO=https://badoo.com/signup/");
iimPlayCode("WAIT SECONDS=1");

var inputs = window.document.getElementsByTagName('input');
for(i=0;i<inputs.length;i++){
	if((/fullname/).test(inputs[i].getAttribute("name"))) {
		inputs[i].focus();
		"firstname".split("").forEach(function(mychar) {
			['keydown','keypress','keyup'].forEach(function(type) {
				utils.sendKeyEvent(type, 0, mychar.charCodeAt(0), 0, 0);
			});
		});
		break;
	}
}
utils.sendKeyEvent('keypress', window.KeyEvent["DOM_VK_TAB"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");
utils.sendKeyEvent('keydown', window.KeyEvent["DOM_VK_DOWN"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");
utils.sendKeyEvent('keydown', window.KeyEvent["DOM_VK_DOWN"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");
utils.sendKeyEvent('keydown', window.KeyEvent["DOM_VK_DOWN"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");

utils.sendKeyEvent('keypress', window.KeyEvent["DOM_VK_TAB"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");
utils.sendKeyEvent('keydown', window.KeyEvent["DOM_VK_DOWN"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");

utils.sendKeyEvent('keypress', window.KeyEvent["DOM_VK_TAB"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");
utils.sendKeyEvent('keydown', window.KeyEvent["DOM_VK_DOWN"], 0, 0, 0);
iimPlayCode("WAIT SECONDS=0.1");
utils.sendKeyEvent('keypress', window.KeyEvent["DOM_VK_TAB"], 0, 0, 0);
"city".split("").forEach(function(mychar) {
	['keydown','keypress','keyup'].forEach(function(type) {
		utils.sendKeyEvent(type, 0, mychar.charCodeAt(0), 0, 0);
	});
});
Tested with iMacros 8.9.7, Win8.1, Waterfox 55 and (german) IP/Browser.
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
Post Reply