so let me clear the string and then try this command again
I think it has to be the zero element
let's try again awesome that part worked now let's just make sure that the search
button is going to work as well so what i can do is grab this here page that in
the immediate window and then run a search and that i got a no such element
exception because there's no such element inside of this original search
box that we tried to find so that kind of defeated the purpose i shouldn't have
executed that statement that took me into this code because now you can see i
have to stop and restart my test i should have been executing a driver's
out find element commands here to be able to touch that out but you saw the
advantage of it right so anyways let me fix this problem I think it's pretty
easy to fix what I'm going to do is use this code right here to find a search
form
okay so now we're finding the search form just like before and now using the
search form we can find element that has the submit ID button let's debug again
and see if this works
so these are the statements that I should be executing in the immediate
window to put that in there put our Firefox to the side fill out this one
with selenium because we already know that works and then hit enter and out
should search oh and of course search form doesn't exist because we're not in
the right context yet so let me step being into the object repository there
we go let's try that and that worked it's returned the element let's see if
it's going to click
fantastic and there it is you guys saw that it worked right let me go back let
me clear this and we can actually finish executing the test and knowing that it's
going to work so I'm just going to step over this it's going to type the
selenium string and then it's going to click the button fantastic everything
was successful we can continue stepping through and then it's going to assert
that we're not on the page which were not and so now our test is successfully
going to finish go back here you'll see a little green check mark and the test
was successful so that was another test the point of me again showing you the
immediate window was to show you how to debug element locators at runtime
without needing to rerun your coat it's extremely frustrating when I see
automation engineers constantly rerunning the tests in order to test
their locators you don't need to do that debug it at runtime figure out how the
locators supposed to be then replace it and then your test is going to work
it'll save you tons of time