You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Examples/A-Simple-Google-Search.ps1
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ if($Driver){
40
40
41
41
# The $AllInputElements contains all the input elements on the page if we want to find the specific element for the google search box we will need to loop through each input element in the $AllInputElements array and get the attibute we want in this case we're looking for the title attribute.
42
42
# And we only want to return the element that has a title equal to Search we can find this out based on the html code on the page.
# Now for the fun part after finding the element we want to send keyboard input to it. this will allow us to automate the search process
46
46
# We can get the list of all special keyboard keys like enter/backspace etc using the Get-SeKeys command
@@ -51,15 +51,15 @@ if($Driver){
51
51
# You can send special key strokes to the SearchBoxElement, you should use the Selenium Keys enum. For example, if we wanted to send an enter key stroke, you could do it like this
# When working with dynamic websites, it’s often necessary to wait awhile for elements to appear on the page. By default, Selenium won’t wait and you’ll receive $null from Find-SeElement because the element isn’t there yet. There are a couple ways to work around this.
55
-
# The first is to use the Wait-SeElementExists cmdlet to wait for the existence of an element in the document.
56
-
#The Wait-SeElementExists will also return the element once it is found so you can use in order to wait and then find elements on the page.
54
+
# When working with dynamic websites, it's often necessary to wait awhile for elements to appear on the page. By default, Selenium won't wait and you'll receive $null from Find-SeElement because the element isn�t there yet. There are a couple ways to work around this.
55
+
# The first is to use the Find-SeElement cmdlet with the -Wait switch to wait for the existence of an element in the document.
56
+
#When using the Find-SeElement with the -Wait please take into account that only 1 element can be returned unlike the without the -Wait switch where multiple elements can be returned.
57
57
58
58
# This command will wait for the img elements for 10 seconds and then return it to you or time out if the element wasn't found on.
0 commit comments