svrnm / DemoMonkey

Custom Demo Every Demo
http://bit.ly/demomonkey
Apache License 2.0
24 stars 10 forks source link

Some commands not working, not found or works strangely #7

Open ClydeDz opened 3 years ago

ClydeDz commented 3 years ago

Hi, @svrnm ,

I was going through different commands available and found that some were not working for me or some worked strangely. Here's the configuration script I'm using for this demo website.

I've added some comments in the configuration script linked above detailing what works and what doesn't but here is a quick snapshot of it:

DemoMonkey version - 7.0.0 Chrome version - 93.0.4577.63

Any help would be much appreciated.

Thanks!

svrnm commented 3 years ago

Hi @ClydeDz, I'll check out your config another time, since I need to make free a few more minutes for that. A few things upfront:

!addScript is not yet in the official release, checkout the dev build: https://bit.ly/demomonkey-dev The parameter for !delayUrl is "seconds", i.e. for how many seconds do you want to delay the web request. Use this feature with care since it can significantly impact performance Your comment rg. !style is a good point, the reason is that the CSS is applied on the parent DOM element. Your feature would require me a few changes, can you open a separate issue for that? Rg, !redirectUrl that's interesting I'll look into it. If you can reproduce it, a video recording or similar could be helpful.

ClydeDz commented 3 years ago

Hi, @svrnm, thanks for replying!

Thanks!

svrnm commented 3 years ago

@ClydeDz replaceAttribute works differently then it is outlined in the docs, what works is the following

!replaceAttribute(index.html, href) = privacy.html

ClydeDz commented 3 years ago

Thanks, @svrnm. Let me try that out soon.

svrnm commented 2 years ago

@ClydeDz I did an update a few days back, can you check if your issues are solved?

ClydeDz commented 2 years ago

Hi, @svrnm, I've had a chance to test it out. Here are the results.

Fixed

For !style() I think it's working as expected and colours the text element itself and not everything in the parent element. Looks like #8 fixed it. If I need to colour Privacy page in red where the HTML is <h1>Privacy page</h1>, I need to specify the entire text "Privacy page" which is fine. However, I cannot just colour the text "Privacy pa" red in colour leaving "ge" out. I believe this is the expected behaviour though?

Did not work

I tried the script below but the response was returned from the actual API endpoint and not my placeholder response configured below. Similar issue with !patchAjaxResponse. Is this the right way to use it?

!replaceAjaxResponse(https://api.icndb.com/jokes/random) = '[{ "type": "success", "value": { "id": 61, "joke": "Some joke.", "categories": [] } }]'

Thanks!

svrnm commented 2 years ago

is this still relevant?