Clicking an element on an autorefreshing page

Hi there,

I am trying to use this extension for a survey website called Prolific. Once you have signed up you simply keep the web page open and studies appear as and when one suitable for you becomes available.

I want to see if it is possible to have a macro running that waits for a study to appear then click the study and click reserve place, from here I can complete the study myself. The problem is that any studies worth more than £1 seem to disappear so quickly that I can only imagine people have automated this process so I would like to do the same.

I am not a coder/programmer so only have a basic understanding of how to put this together. What I have so far is below but I’m unsure if this will work, also it seems that the macro cannot be running continuously to look for this element appearing although I may be wrong.

Any assistance would be appreciated.

{
“Name”: “Prolific”,
“CreationDate”: “2020-6-2”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://app.prolific.co/studies”,
“Value”: “”
},
{
“Command”: “waitForElementPresent”,
“Target”: “xpath=//[@id=“app”]/div[2]/div/div/div/div[1]/ul/li/div/div/div[2]/span[3]",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“app”]/div[2]/div/div/div/div[1]/ul/li/div/div/div[2]/span[3]”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//*[@id=“app”]/div[2]/div/div/div/div[2]/div/div[3]/div[1]/form/button/span”,
“Value”: “”
}
]
}

Studies appear on the left and then the information and reserve place button appear on the right. I recorded the above macro when a low pay study appeared but I’m unsure if the code will even work with every study that appears or just that one I used to record.

You can use a loop or times command to try to click and with errorignore YES the macro can continue always, when it find a studio can play a sound to advice you,

Thank you for your help! :slight_smile:

1 Like