Hey I am trying to use “Get Element” Activity but not able to make selector as activity is not trying to make any selector by clicking on UI. and if it does by any how i am not able to validate it what could be the issue ? please resolve..
most often it’s due to DPI settings ( zoom )
I tried this
but still facing this issue in this let me show you the selector:
[
{
“Selector”: “NM”,
“browser”: “chrome”,
“frame”: “-1”,
“url”: “NIFTY Options Chain — NSE:NIFTY — TradingView — India”
},
{
“xpath”: “//div[@id="js-category-content"]/div[2]/div/section/div[3]/div[2]/div/div/div/div[1]/div/div[2]/div[2]/button[1]”
}
]
this is the flow:
when i run the bot, bot just pass through the get element activity but didn’t enter in it and fetch the values
hmm, that does look weird …
if you click Record , does the green highlighter move around with your mouse or not at all ?
not at all i can’t see the green highlight
If you have 0 in MinElements
it will do that, if you have 1 (the default) it will give you element not found
error, OR run the code inside the body.
The WriteLine will not do anything if the element does not have text … so try adding text BEFORE the item.value … like "debug: " & item.Value
on clicking record then hovering it over UI element shows green color highlight but when making selector through get element i can’t see any highlights
Do you have a Get Element inside another Get Element ?
In that case, the nested ( the one inside the other ) will ONLY search inside the elements found with the outer Get Element … so you cannot have a “full” selector inside the second one
yes i have nested Get element activity let me show you:
parent Get Element selector:
[
{
“Selector”: “NM”,
“browser”: “chrome”,
“frame”: “-1”,
“url”: “NIFTY Options Chain — NSE:NIFTY — TradingView — India”
},
{
“xpath”: “//div[@id="js-category-content"]/div[2]/div/section/div[3]/div[2]/div/div/div/div[1]/div/div[{{i}}]/div[2]”
}
]
this is dynamic
chlid get element selector:
[
{
“Selector”: “NM”,
“browser”: “chrome”,
“frame”: “-1”,
“url”: “NIFTY Options Chain — NSE:NIFTY — TradingView — India”
},
{
“xpath”: “//div[@id="js-category-content"]/div[2]/div/section/div[3]/div[2]/div/div/div/div[1]/div/div[2]/div[2]/button[1]”
}
]
this once selector is done i need to make it dynamic;
You cannot do that. The robot is CONCATENATING the two selectors (kind of, it’s concatenating the selector for each element it finds AND the selector in the nested element).
So you need to remove {“Selector”: “NM”,“browser”: “chrome”, ...
part, and remove the “//” part from the XPath.
I got the solution It was due to the parent selector as it was dynamic, the child selector was not able to find the child UI elements so i revert the parent selector to original one then it worked, Thanks for the help!!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.