How to change SELECTOR from div element to class - imacros

Element have id=":h.f" and class="df b-K b-K-Xb URaP8 editable"
i need to replace DIV element with class, how can i correctly do it?
EVENTS TYPE=KEYPRESS SELECTOR="#\\:h\\.f" CHARS="text"

Try this:
EVENTS TYPE=KEYPRESS SELECTOR="div[class=\"df b-K b-K-Xb URaP8 editable\"]" CHARS="text"

Related

How to scroll down inside followers popup on Instagram?

How can i properly use scroll function inside Instagram popup.
I used js function to scroll , which didnt worked
window.scrollBy(0,800);
via Imacros
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY" KEY=34
As well before scroll event used to click between users to make popup active and then used scroll, before it worked but for now it's not.
Is there any proper way to scroll inside popup?
I think the following command may be helpful:
EVENT TYPE=KEYPRESS SELECTOR="div.j6cq2" KEY=34
This works for me in 2019... Don't change anything!
FList = driver.find_element_by_css_selector('div[role=\'dialog\'] ul')
numberOfFollowersInList = len(FList.find_elements_by_css_selector('li'))
FList.click()
actionChain = webdriver.ActionChains(driver)
time.sleep(random.randint(2,4))
while (numberOfFollowersInList < max):
actionChain.key_down(Keys.SPACE).key_up(Keys.SPACE).perform()
numberOfFollowersInList = len(FList.find_elements_by_css_selector('li'))
time.sleep(0.4)
print(numberOfFollowersInList)
actionChain.key_down(Keys.SPACE).key_up(Keys.SPACE).perform()
time.sleep(1)

Can not press enter key with textarea in imacros

I just tried to hit the enter key with imacros in firefox but doesnt work.
The photo of my div is:
The image of my div
I tried using the following code:
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>#number>DIV:nth-of-type(5)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>textarea" KEY=13
But not work why is not working keypress with imacros.
my version is:
8.9.7
Sometimes other key event types might help:
EVENT TYPE=KEYDOWN SELECTOR="HTML>BODY>#number>DIV:nth-of-type(5)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>textarea" KEY=13
or
EVENT TYPE=KEYUP SELECTOR="HTML>BODY>#number>DIV:nth-of-type(5)>DIV:nth-of-type(3)>DIV:nth-of-type(2)>textarea" KEY=13

How to trigger tooltip using iMacros

I want to capture the screenshots of tooltip which appears when I mouseover the image. The image contains title attribute. The code mentioned below is higlighting the image with a border but its not showing the tooltip.
TAG POS=3 TYPE=IMG ATTR=HREF:http://* CONTENT=EVENT:MOUSEOVER
You should use the EVENT commant instead of TAG in this case, e.g.:
EVENT TYPE=MOUSEDOWN XPATH=".//body/descendant::img[3]" BUTTON=0
more info: Imacros wiki > EVENT

How to select everything that goes after #imageContent

I have this line of code
EVENT TYPE=CLICK SELECTOR="#imageContent18>IMG" BUTTON=0
Number 18 always changes so i want to select everything that goes after #Content
i trued to do it likes this #imageContent*, but it's seems something incorrect in my syntactic
You may try something like this:
EVENT TYPE=CLICK SELECTOR="[id^=imageContent]>IMG" BUTTON=0

Is it possible to make sencha touch 2.0 list component to have its items expandable?

I have a list component which is filled out using a data store(data loaded from server as json). A part of data from data store is displayed as list items, and i need some kind of a "+" button to the left of it to expand a list item(and "-" to collapse) to reveal(/hide) the remaining info. I could simply put some javascript to itemTpl tag but i've no idea how to make smooth transitions this way. Maybe am missing some standard settings for a list component, but i can't find any info. Any help appreciated.
There is no standard settings to do this functionality. But this is possible to achieve. You can have your item template as something like this:
itemTpl: '<div class="plus"></div><div class="title">{title}</div><div class="hidden">{mydetails}</div>'
Initially, the details is hidden. You need to handle the animation when your taps the list item. So, in your event you will have to do:
itemtap: function(view,index,htmlElement,e,opts) {
// change the div plus to minu..
// Get hold of the div with details class and animate
var el = htmlElement.select('div[class=hidden]');
el.toggleCls('hidden'); //remove the hidden class if available..
el.show(true); // show with animation
}
The object is obtained from select() method is Ext.dom.CompositeElementLite .. Refer this class for more methods. You can call the Ext.Anim from this object as well..
To animate you can use the Ext.Anim class. Once you have the html element of you 'details' div, you can:
Ext.Anim.run(detailsDiv,'slide',{
out:false,
from: 'hiddenCSS',
to: 'visibleCSS'
});
Refer to Anim class for more setting that might be needed to have your desired effect. Also note that you will have to track the previously clicked (expanded) list items.