Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkbox cannot be found every time.... #71

Open
Stephanevg opened this issue Nov 28, 2024 · 0 comments
Open

Checkbox cannot be found every time.... #71

Stephanevg opened this issue Nov 28, 2024 · 0 comments

Comments

@Stephanevg
Copy link

I am trying to download a file from a specific website.

It is strange, as I actually had it work yesterday. closed everything yesterday after work, and this morning it doesn't work anymore....
And I cannot reproduce it anymore.... 😿

$browser = New-MonocleBrowser -Type Chrome
$Browser.url = "https://www.dell.com/support/security/en-us?lwp=rtt"
$SearchBoxElementID = "dds_prod-name-search"

#Setting things up to filter the search
Get-MonocleElement -Id $SearchBoxElementID | Set-MonocleElementValue -Value 'Latitude 5350'

$CheckBoxFilterId = "Latitude_5350-1_0"

#Fetching the checkbox (This fails...)
$CheckBox = Get-MonocleElement -XPath '//*[@id="Latitude_3550-1_0"]'

#Checking the checkbox
Set-MonocleElementAttribute -Element $CheckBox -Name 'Checked' -Value 'Checked'

Is it possible that some elements are not visibile ?

I tried using the -All also, but no luck.
I also tried fetching the parent element in which that checkbox is located like this:

$e = Get-MonocleElement -XPath '//*[@id="productnamefield"]'
Get-MonocleElement -XPath '//*[@id="Latitude_3550-1_0"]' -Scope $e

But it still couldn't find it...

When I search for the first element of that list of checkboxes (which is HUGE!) It actually works:

Get-MonocleElement -XPath '//*[@id="Alienware_15-1_0"]'

WrappedDriver                        : OpenQA.Selenium.Chrome.ChromeDriver
TagName                              : input
Text                                 : 
Enabled                              : True
Selected                             : False
Location                             : {X=64,Y=1635}
Size                                 : {Width=0, Height=0}
Displayed                            : False
LocationOnScreenOnceScrolledIntoView : {X=64,Y=360}
Coordinates                          : OpenQA.Selenium.Remote.RemoteCoordinates

So would this mean it actually hits a timeout or so ?

When I try using -verbose we see it tries 30 times, and then it throws an error:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant