Saturday, May 11, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 1373  / 2 Years ago, tue, september 13, 2022, 6:21:13

I have been trying for many days to get xdotool to move and click inside firefox but I couldn't. So please help me.
My script was simple but it didn't work :




#!/bin/bash

firefox www.google.com # opening firefox
sleep 2 # wait 2 sec
xdotool mousemove --sync 1335 165 #moving the mouse to a coordinate
sleep 2 # wait 2 sec
xdotool click 1 # finally clicking in a button


I would appreciate it if someone can help me.






More From » firefox

 Answers
6

ok I found the solution and it works for both Ubuntu and Centos :




#!/bin/bash
/usr/bin/firefox &
sleep 2
xdotool mousemove 1335 165
sleep 2
xdotool click 1

[#24243] Tuesday, September 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lotceptin

Total Points: 374
Total Questions: 106
Total Answers: 118

Location: The Bahamas
Member since Tue, Apr 27, 2021
3 Years ago
;