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
Related
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)
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
I made a script on iMacros using normal recording mode to make a wall post, but it doesn't seem to be recording the content to pasted on my wall though..
This is the code I wrote using the normal mode
TAG POS=1 TYPE=DIV ATTR=CLASS:_1mf<SP>_1mj EXTRACT=TXT
The above is able to extract contents from the post message field, however I'm unable to make it type contents into the same field... :(
Now, I have tried using EVENT recording mode and I am still facing issues.. Here is my code:
EVENT TYPE=MOUSEDOWN SELECTOR="#u_0_16" BUTTON=0
EVENT TYPE=MOUSEUP POINT="(386,118)"
EVENT TYPE=KEYPRESS SELECTOR="#js_gy>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV" CHAR="d"
EVENTS TYPE=KEYPRESS SELECTOR="#js_gy>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>DIV>DIV" CHARS="Pasting Sample Content"
What am i doing wrong? :O :O
I don't know why you're still facing issues. So for example, try to play these lines:
TAG POS=1 TYPE=DIV ATTR=CLASS:_1mf<SP>_1mj EXTRACT=TXT
EVENT TYPE=CLICK SELECTOR="DIV[CLASS='_1mf _1mj']" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="DIV[CLASS='_1mf _1mj']" CHARS={{!EXTRACT}}
I want my form to submit when I hit the Enter key in the search input control, because the submit button is not available.
When I hit Enter manually it's working properly: the search keyword is submitted successfully. But when I record the successful keypress event using iMacros, it does not do anything during the replay. The event is recorded as KEY=13.
The iMacros code I'm using:
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>UL>LI:nth-of-type(2)>BUTTON" BUTTON=0
EVENT TYPE=CLICK SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>FORM:nth-of-type(2)>TEXTAREA" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)>DIV>FORM:nth-of-type(2)>TEXTAREA" CHARS="2nd search"
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>DIV>DIV>SECTION>ASIDE>DIV>DIV>UL>LI:nth-of-type(7)" KEY=13
Here is the test page of my case: http://zeccartourisme.com/test.html
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"