-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Change focus to parent element using NightwatchJS #80
Comments
I was able to get around this problem by resetting the focus back up to the top level element and crawling down again.
It's a workable solution. |
Cool, I'll make sure to add the frame/parrent in the next version. |
I asked the same question on StackOverflow and I got a response that brought up the point that this is a frame/parent is a brand new JsonWireProtocol spec. The suggestion was to use driver.switchTo().defaultContent() instead. The full post can be found in the link below. I just thought it would be worth mentioning. |
I think that may be the same as |
Added in 0.4.8 |
helpful |
Seems like moving up and down frames is impossible using SafariDriver. Is this true or am I missing something? |
frame/parrent do nothing, .frame(null) and defaultContent() refreshes the page to start url (it changes while test with redirect). How I can just switch to the parent frame without changing url or refreshing the page? |
@Crusader4Christ I am working with a web app using iframes and have had no problem jumping to and from the top frame using P.S. Using the safari driver at that |
@senocular
I try to use frame(null) inplace of refresh() but no luck - nightwatch can`t get access to '//*[@id="accounts-deposit-table"]/thead/tr/th[1]' after that and jumps on previous page. I try frame(null) inside function too. Somebody knows what is the problem? |
@Crusader4Christ does your clicking submit do anything that might mess with the state of the page? Have you tried pulling out some of the commands like that to see if that helps - basically just have the frame calls and maybe a waitFor or two just so you know that the change of frame context was made. Then maybe you can see if some other command is messing with the frames. Also, FWIW, you don't have to use the frame callback to perform actions in that frame. You can chain it right off of the frame call: .pause(3000)
.frame('iframe_payment')
.useCss()
.waitForElementVisible('#pop_up_window input[type=password]', ... |
... though, concerning the frame callback, have you checked the result argument for any error data in the failure case? |
It is possible to move deeper into the DOM tree using the .frame JSON Wire Protocol call but I haven't been able to figure out a way to move upward through the DOM tree.
There is a JSON Wire Protocol call frame/parent that is able to move up to the parent element but it is not currently supported by NightWatchJS. Any suggestions would be appreciated.
The text was updated successfully, but these errors were encountered: