dropdown selection

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
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: 287
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
techimac
Posts: 287
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
thecoder2012
Posts: 248
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!
Post Reply