How to open chrome new tab in pyautogui. I don't get any errors but the code doesn't work


raki calm style

I am saving Whatsapp contacts to sheet.google.com. I am using new_tab = pyautogui.locateCenterOnScreen('btn.png')and pyautogui.click(new_tab) to open a new tab. but it doesn't click that button i don't get any error how to fix! !

my code:

import pyautogui    

new_tab = pyautogui.locateCenterOnScreen('btn.png')
pyautogui.click(new_tab)
Birch Cinazu

Try this

new_tab= pyautogui.locateOnScreen('btn.png', confidence=.6)
        pyautogui.moveTo(new_tab[0], new_tab[1], duration=self.speed)
        pyautogui.click(interval=self.click_speed)

may be work

Related


Python: My if statement doesn't work, but I don't get any errors?

Aditya Mehta I'm creating a tic-tac-toe game and the move_base function in the script doesn't work. I've seen this kind of if statement used before, but I don't know why the function isn't working. No errors, but the function doesn't update num_word or move. I

Python: My if statement doesn't work, but I don't get any errors?

Aditya Mehta I'm creating a tic-tac-toe game and the move_base function in the script doesn't work. I've seen this kind of if statement used before, but I don't know why the function isn't working. No errors, but the function doesn't update num_word or move. I

Python: My if statement doesn't work, but I don't get any errors?

Aditya Mehta I'm creating a tic-tac-toe game and the move_base function in the script doesn't work. I've seen this kind of if statement used before, but I don't know why the function isn't working. No errors, but the function doesn't update num_word or move. I

Python: My if statement doesn't work, but I don't get any errors?

Aditya Mehta I'm creating a tic-tac-toe game and the move_base function in the script doesn't work. I've seen this kind of if statement used before, but I don't know why the function isn't working. No errors, but the function doesn't update num_word or move. I

Python: My if statement doesn't work, but I don't get any errors?

Aditya Mehta I'm creating a tic-tac-toe game and the move_base function in the script doesn't work. I've seen this kind of if statement used before, but I don't know why the function isn't working. No errors, but the function doesn't update num_word or move. I

Python: My if statement doesn't work, but I don't get any errors?

Aditya Mehta I'm creating a tic-tac-toe game and the move_base function in the script doesn't work. I've seen this kind of if statement used before, but I don't know why the function isn't working. No errors, but the function doesn't update num_word or move. I

Python: My if statement doesn't work, but I don't get any errors?

Aditya Mehta I'm creating a tic-tac-toe game and the move_base function in the script doesn't work. I've seen this kind of if statement used before, but I don't know why the function isn't working. No errors, but the function doesn't update num_word or move. I

Selenium C# Open "New" tab CTRL+T doesn't work with CHROME

crush static void Main() { IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://google.com"); IWebElement body = driver.FindElement(By.TagName("body")); body.SendKeys(Keys.Control + "t"); } This is the code I'm trying to

Selenium C# Open "New" tab CTRL+T doesn't work with CHROME

crush static void Main() { IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://google.com"); IWebElement body = driver.FindElement(By.TagName("body")); body.SendKeys(Keys.Control + "t"); } This is the code I'm trying to

Selenium C# Open "New" tab CTRL+T doesn't work with CHROME

crush static void Main() { IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://google.com"); IWebElement body = driver.FindElement(By.TagName("body")); body.SendKeys(Keys.Control + "t"); } This is the code I'm trying to

Selenium C# Open "New" tab CTRL+T doesn't work with CHROME

crush static void Main() { IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://google.com"); IWebElement body = driver.FindElement(By.TagName("body")); body.SendKeys(Keys.Control + "t"); } This is the code I'm trying to

Selenium C# Open "New" tab CTRL+T doesn't work with CHROME

crush static void Main() { IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://google.com"); IWebElement body = driver.FindElement(By.TagName("body")); body.SendKeys(Keys.Control + "t"); } This is the code I'm trying to

Selenium C# Open "New" tab CTRL+T doesn't work with CHROME

crush static void Main() { IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl("http://google.com"); IWebElement body = driver.FindElement(By.TagName("body")); body.SendKeys(Keys.Control + "t"); } This is the code I'm trying to

Grails app doesn't run but I don't get any errors

Nick Wilson I'm new and trying to compile and run an application using the source code that the vendor has given us. I'm doing this in IntelliJ, but just trying to run it in the terminal. I am able to successfully compile the application at the command line. N

Left click on link doesn't work, but "open in new tab" works

rock degree I'm working on my personal website (built from a template) and when I'm done, my links stop responding to left clicks. They work fine if you right click and select "Open in New Tab". You can see the URL in the status bar at the bottom of the browse

Left click on link doesn't work, but "open in new tab" works

rock degree I'm working on my personal website (built from a template) and when I'm done my links stop responding to left clicks too. They work fine if you right click and select "Open in New Tab". You can see the URL in the status bar at the bottom of the bro

Left click on link doesn't work, but "open in new tab" works

rock degree I'm working on my personal website (built from a template) and when I'm done my links stop responding to left clicks too. They work fine if you right click and select "Open in New Tab". You can see the URL in the status bar at the bottom of the bro

No compile errors, but I don't get any output in C

Prajnamisra This has been bothering me. This is a simple function to detect prime numbers, but I don't get any output on my console, although there are no compile errors. Can someone detect what's wrong with this code? #include<stdio.h> int isprime(int); int

No compile errors, but I don't get any output in C

Prajnamisra This has been bothering me. This is a simple function to detect prime numbers, but I don't get any output on my console, although there are no compile errors. Can someone detect what's wrong with this code? #include<stdio.h> int isprime(int); int