Not able to click a button using nightwatch , since button's bottom edge touches footer and no scroll space - selenium

I am using Nightwatch for automating scripts.
Facing an issue, not able to click a button using Nightwatch, since the button's bottom edge touches footer and no scroll space.
I tried
1. browser.maximizeWindow(); but command doesn't works.
2. browser.windowSize('current', 1200, 1200, function(result) {}); it works but on different machines and env it might cause issue.
Is there any other solution to click on a button which will work independently?

Related

i want to scroll a voew to right and click on 3 dots, sometimes automatically it detects the button, sometimes not

I have to scroll right in cypress for a specific view part. Sometimes it automatically detect, but sometimes after scroll only it detect the button. Scrollbar has no unique ID. What is the solution for this scenario?
I tried cy.scroll(500,0) but this dont work
You can get the element then use .scrollIntoView() chained to the returned element.
cy.get('#uniqueId')
.scrollIntoView()
// now it will be in current viewport

Sliding a frameless window in and out of screen edge in qml

As the title says, I want to move, clicking a button in task bar , a frameless window out and in of screen right edge .One way to achieve this under kde neon in QML, is to create a PlasmaCore.Dialog{} window and setting as flags the Qt.X11BypassWindowManagerHint only, so the window manager is bypassed.The problem with this solution is that, inside window, where i "append" some widgets in a ListView, I can not have activeFocus to TextArea and I can not type anything there. The TextArea gains activeFocus only if I use as flags the Qt.Popup only without Qt.X11BypassWindowManagerHint.
So is there an alternative solution of making the window sliding in an out from screen right edge without using the flags of Qt.X11BypassWindowManagerHint? In the below link is the code I am using now for sliding window:
https://gist.github.com/cgiannakidis70/8a0ea61d7f18e803381159d7456e2135
EDIT 1
After a lot trying and error I found that the use of flags Qt.BypassWindowManagerHint and Qt.Popup do the trick.Now I can slide the window outside screen edge and also type in TextArea inside a widget .

Cypress - hidden button because of scrollbar

I have a problem. If I click on one button then it shows a little window where I need to click on another button. But it is hidden because that window is too small and needs to move with scrollbar. How should I click or move with that scrollbar and then click on the button?
If I try playground on that it takes full window.
Thank you for your answers.
Is that modal related to the width of the screen? If it is you can solve it by adding a new configuration for the viewport to cypress.json:
{
"viewportWidth": 1920,
"viewportHeight": 1280
}
And then of course to a width that is enough to solve your problem.
If that doesn't work, I believe this page can help you: https://docs.cypress.io/api/commands/scrollto.html#Scopes . The result will be something like this:
cy.get('modal_name')
.scrollTo('right')
Besides that I expected a cy.get() to still get the button you were looking for.
This is a very natural way of thinking whilst getting your element. However, imagine you are manually testing the screen above, you will have scroll in order to see and take action to the hidden element. Why should cypress be different?
It is important to transcript to your test, exactly the same actions you would do if manually executing the test. As a result, you should have a scrollIntoView action.

Selenium IDE - selecting an button outside the frame

I am relatively new to Selenium. We are using the Selenium IDE to do some regression testing. I have a menu bar that has different buttons on it that will drop down a menu when you hover over any of the buttons (there are 4 buttons on the menu bar). So when i select one of the menu items from the dropdown, it opens a page inside the same window. This page looking at the debug info in Selenium seems to be a frame. This frame open right under the menu bar and the menu bar is still visible. Once the page has loaded completely, I want to go outside the frame and click on a button on the menu bar and click on the next item to verify. This doesnt seem to work, once the page (frame) has loaded then nothing happens. I have tried using window focus, select frame, mouse over commands but nothing seem to work. i have also used the relative = parent and relative = top commands with the select frame command but cant get it to work.
Any tips or suggestions are welcome. If I am not clear on the description I can provide more details. Thanks for the assist.
If the control is outside of the frame Selenium is pointing to, then you need to switch back to default content, and possibly switch to the frame the control is in.
Driver.SwitchTo().DefaultContent();
Driver.SwitchTo().Frame(frameID);
you should firstly switch to appropriate frame where your button is located in:
1. Switch to frame
Command: selectFrame
Target: your_frame_id
2. Click button
Command: click
Target: your_button_id (or you can use XPath or CSS selector instead)

jQuery Animate Toggle - Animation only works on second click

Task: I wanted to create a simple share button which extends to a share section (F,T,G,P) when clicked.
I failed to let the section slide out of the share button - what I really, really wanted - but managed to let a separate ul element slide out on the right side.
The animation worked… until I set the ul to hide initially via $('.networks').hide();
The sections is intended to only show up after a click, but now after the first click it just "pops open" ignoring the configured slide-out. Sliding only works in both directions (open and close) after clicking on it at least once .
I've uploaded an Example here at Codepen.io and as a jsFiddle.
Side note: the demos are behaving a little bit strange since they appear to only show a slide-in fx. The slide-out fx, with which we start, always looks like it pops open - that's not the case, it works after the second click, so you got to focus your eyes to see it (on a normal browser it visibly works better).
PS: Bonus points if you help me make this slide out of the "share" button. Be aware that I only have rudimentary knowledge of Javascript ( * duck and run * ).
Take a look at this fiddle link.
I changed the display property of the buttons to be inline-block instead of inline.
Elements with display inline can not have a width and i think it was the reason why jQuery was not able to animates the Elements width. I also animated the wrap around the ul instead of the ul.
EDIT: made a fast mockup of the thing sliding out of the button. Changed some css to be on the list elements itself instead of on the a elements, just work through the css and I think it will look ok.
edit forgot the link: link