boiler wrote: ↑29 Nov 2022, 09:20
automater wrote: ↑
... this doesn't work when I run my script:
Code: Select all
Page.getElementById("includeZeroImpressionEntities").checked = false
Nothing is happening and I have no idea why.
Again, you need to use the expression version of the assignment operator:
Code: Select all
Page.getElementById("includeZeroImpressionEntities").checked := false
It is important that you apply correct AHK syntax when going from what works in the dev tools to your AHK script.
automater wrote: ↑
2) When using Rufaydium's commands (e.g. getting elements), how do I know when I need the dot (".name") and when I don't? Are dots for classes only? What subset of knowledge is this? Some subset of JavaScript? If you can point me in the right direction here as well, I'd really appreciate it.
I'm not exactly sure what you mean. The dots are separators between elements/levels in an object. You need to use them until you get to the level of what you need. If you don't get all the way down to a property such as
.name, then the result is typically an object, such as an array of items or an object that has different properties (or an even higher level that has a lot of "branches"). You will learn more about those kinds of things when going through the lessons found at my google suggestions.
Thanks for your help thus far
@boiler. I've made a bit of progress in my project with your input.
I've run into a couple of other issues though.
1) This doesn't work (I read through the Expressions page and I can't seem to figure out what's the issue):
Code: Select all
Page.getElementById("includeZeroImpressionEntities").checked := false
I've also tried these:
Code: Select all
Page.getElementById([b]'[/b]includeZeroImpressionEntities[b]'[/b]).checked := false
Page.getElementById("[b].[/b]includeZeroImpressionEntities").checked := false
Any ideas?
Also, my aria-label click is now working thankfully
:
Code: Select all
Page.querySelector("[aria-label='Choose Tuesday, November 29, 2022 as your end date.']").click()
I'm trying to make the date dynamic now but it's not working. Here's what I've done:
Code: Select all
FormatTime, TimeString,, LongDate
endDate := """[aria-label='Choose " TimeString " as your end date.']"""
When I test endDate output in a MsgBox, the output is exactly what I need including the double quotes enclosing the line (per the working line above) yet none of these attempts to use the variable works:
Code: Select all
Page.querySelector(endDate).click()
Page.querySelector(%endDate%).click()
Sorry for the bother but really trying to research, understand, and trial and error on my end but I just can't get it to work
As I'm typing I just came up with another idea...maybe I can create a variable with everything from page to the end of the aria-label then add the click, so: var.click()
Shooting from the hip here but I'm not giving up.
Any ideas
@Xeo786?
Thanks guys,
Jon.