When the button is clicked, automatically sync data from a website to update a Google Sheets spreadsheet

I am a frequent Betfair user and I meticulously track my bets in a Google Sheets spreadsheet.

The manual entry of bet information is time-consuming.

I am exploring the idea of automatically extracting bet details from the Betfair website when clicking on the 'Place Bets' button (see image), then creating a script to update my Google Sheets spreadsheet using Selenium Webdriver.

Is it possible for me to trigger my own script for a specific event on a webpage?

Any assistance or guidance on this matter would be highly appreciated!

https://i.stack.imgur.com/MD9iM.png

Answer №1

Step One: Master the art of posting content to a Google Sheet. Get started by checking out this informative video on YouTube.

Step Two: Explore the fundamentals of creating Google Chrome Extensions. You only need to grasp the basics. Check out this resource to get started.

Step Three: Analyze the webpage and locate the div elements for bet prices and buttons.

Step Four: Once you have that information, incorporate it into your JS script for the extension.

Enjoy the results. Best of luck on your journey!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Change to the parent frame using webdriver

I am facing an issue while trying to switch to the parent frame or iFrame using webdriver.js. Although I have implemented a function that works, it only goes up to the second level of frames. When attempting to switch to the parent frame from a deeper fr ...

What is the best method to create Promise API synchronously?

When it comes to testing with NodeJS, I rely on selenium-webdriver. My goal is to streamline the selenium-webdriver API by making it synchronous, which will result in more concise tests. The method getTitle() is used to retrieve the title of the current p ...

Having trouble updating the environmental variable file using newman in NodeJS when running multiple collections simultaneously

While running multiple collections in NodeJs using Postman, I encountered an issue with sharing the clientHandshakeToken variable set in the first collection across subsequent collections. Despite my attempts to use Newman for this purpose, the second coll ...

I am having trouble figuring out the reason why the node process keeps crashing on my Raspberry Pi 2

I've developed a Node program that utilizes the Selenium web driver to navigate through multiple URLs. However, I've noticed that I am not properly closing the web driver instance after each use. The program runs on a Raspberry Pi 2 for around ...

Executing Selenium tests: utilizing the webdriver.wait function to repeatedly call a promise

Currently, I am using Selenium ChromeDriver, Node.js, and Mocha for testing purposes... I am facing a dilemma at the moment: The driver.wait function seamlessly integrates with until. I have a promise, which we'll refer to as promiseA. This pro ...

Utilizing Selenium JavaScript to insert a cookie into a request

Trying to add a cookie to the request in Selenium using JavaScript. I followed the documentation at this link, but my code snippet doesn't seem to pass any cookies to the PHP script below on the server. Here is the client-side JavaScript code: var w ...

The error message "NoSuchSessionError: invalid session id" pops up in Selenium, despite the fact that the application is running smoothly

Scenario and Background: I have recently developed a script to access an external website and extract specific data. The script's purpose is to retrieve grades of students and convert them into usable data for plotting. In order to streamline the dat ...

Why am I getting the error "Chai assert.isBoolean is not defined as a function"?

Snippet of code: driver.wait(function(){ return driver.isElementPresent(webdriver.By.className(errElement)); }, 3000, 'Element' + errElement + ' is not found').then(function(binaryVariable){ assert.isTrue(binaryVariable, &apos ...

How would you execute a simple protractor test with the provided file hierarchy?

I have attempted to follow a tutorial located HERE for running protractor tests. Despite my efforts, I am facing an issue where the tests do not seem to run when I attempt to start them. While my webdriver-manager is functioning correctly, nothing seems to ...

Executing Nightwatch.js Upload Command

Looking to develop a nightwatch action that involves uploading files to a specific upload form. Can an action like this be created within the nightwatch framework? Nightwatch is linked to a nodejs app and operates through a selenium webdriver. ...

listening for new messages on discord using a loop in discord.js

My Discord.js bot is experiencing an issue where the callback function for the "message" event is not triggering inside a loop in my code, despite working correctly everywhere else. I've tried using console.log statements for debugging but haven' ...

The issue with Protractor's sendkeys function is that it requires an X display for converting keycodes

I've encountered an issue while attempting to execute Protractor e2e tests in a Vagrant VM using headless Chrome. Despite successfully configuring Xvfb, I face an error when trying to fill out a form: unknown error: an X display is required for keycod ...

Protractor unexpectedly giving back a promise instead of the expected attribute value

I'm facing a challenge where I am attempting to extract the value of an HTML attribute and store it in a variable named url_extension. However, instead of getting the desired value, I keep receiving a Promise object. Below is my code snippet: (Please ...

Using JavaScript and the Firefox browser, learn how to easily highlight an element with Selenium-WebDriver

I am struggling with creating a valid function to highlight specific elements on a webpage. As a beginner in coding, I suspect that the issue may either be related to my environment setup or a lack of knowledge about JavaScript/Selenium features. I am wri ...

Comparing NemoJs and NightWatchJS: The Pros and Cons

As a beginner in both frameworks, it appears that Nightwatch has more extensive documentation and API features compared to Nemo. What are the main benefits of choosing one over the other? ...

Issue with installing chromedriver and selenium-driver on Windows 7 using NPM arise

I have a relatively basic package.json file with some development dependencies included. Here is what it looks like: "devDependencies": { "cssnano": "3.3.2", "cucumber": "0.9.2", "diff": "2.2.0", "grunt": "0.4.5", "jit-grunt": "0.9.1", " ...

The setTimeout functionality is executing faster than expected

In my selenium test, I've noticed that the setTimeout function consistently finishes about 25% faster than it should. For example, when waiting for 20 seconds, the function completes after only 15 seconds. test.describe('basic login test',f ...

Extracting elements using Node.js and Selenium

I'm currently experimenting with Selenium and nodeJS for the first time. I'm trying to parse an HTML page and am running into issues when attempting to perform a deeper search using XPATH on returned elements. Below is my code: async function par ...

Facing difficulties in initiating Selenium with PhantomJS/GhostDriver as child processes

I am currently working on a Node script that involves using the child_process module in order to run a Selenium server with PhantomJS's GhostDriver. I have imported the module: Child = require "child_process" This is how I am attempting to start the ...

Utilizing the same WebDriverJS instance repeatedly

As a beginner in Selenium, I successfully launched a website using the following Node.js code snippet: var webdriver = require('selenium-webdriver'); var driver = new webdriver.Builder() .forBrowser('chrome') .build(); console ...