I try to click element that doesn't appear in page then I use "keyword Scroll Element Into View" but it doesn't scroll into view and Robot return element is not clickable at point.
I try these way: Nothing happen and cannot click
Scroll Element Into View &{quickLink}[sendDoc]
Set Focus To Element ${PRODUCT}
Click Element ${PRODUCT}
And these way: it scroll to the bottom of page and cannot click
Wait Until Element Is Visible ${PRODUCT} timeout=30s
${x}= Get Horizontal Position ${PRODUCT}
${y}= Get Vertical Position ${PRODUCT}
Execute Javascript window.scrollTo(${x}, ${y})
Set Focus To Element ${PRODUCT}
Click Element ${PRODUCT}
ElementClickInterceptedException: Message: Element is not clickable at point (453.75,186.5) because another element obscures it
Instead of scrolling, you have more options:
1) Resize your browser, so you dont need to scroll (use xvfb to create a screen with a specific size, then use Set Window Size)
2) I guess only using "Wait Until Element Is Visible" is enough. No need to scroll
Related
I have a list where every element has a share button, when I press on the
share button a box/bubble opens up with the social mdia buttons.
when the share box opens it should go over the list items (even if it covers the next elements on the list), how can I achieve that?
current state
The box shouldn't push the height of the item list it should be on top of everything
In my webform I have a repeater control. I have a button to open pop Up also. This pop up contains all records which are coming up in the parent window. On selecting the record I have to move the scrollbar of parent window for the location of the record.
Any Suggestion?
If your popup have fixed position and you do not support IE7 and less you can use simple link anchoring:
records/#record1
where record1 is ID of the record header or container. In this case browser will focus on the target element and your popup will stay with fixed position.
Also, you can use jQuery for it. You can get position of the target eleemnt and then scroll window to this position. Here is example of scrolling: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/
<div id="record1"></div>
<div id="record2"></div>
<div id="record3"></div>
and links should be like
record1
record2
record3
Below is the code to move the scrollbar in two cases.
window scroll
Repeater in div
repeater.item[0].focus();
When I was starting to drag any element, mouse wheel scrolling is turned off, how to scroll while dragging?
I'm newbie here, so I can't insert a picture, here's a link http://i.stack.imgur.com/4tp69.gif
Hm... I would say it is because the scrolling is caught by the dragged element, as it is on top of the VGroup. So - I guess the solution would be to listen to scrolling event in the dragged element and send that to the VGroup / something that will handle the drag'n'scrolling of the VGroup.
Also - I am not sure, but when you are dragging, the VGroup might no more be specified as the dragged element's parent - so, just add a realParent reference or whatever so you can always access it.
I am having an iframe on a page. The iframe resizes itself based on the content loaded in it. So, it won't be having any scroll bars.
The iframe contains a list of draggable elements (Prototype & Scriptaculous). I have to drag the elements from bottom to top or vice versa, and while dragging, the parent window should scroll accordingly. I have modified the dragdrop.js file accordingly to scroll based on "window.parent.window" element. The outcome is that the parent window scrolls from bottom to top automatically on the drag of an element, but not vice versa.
Ok guys, thanks everyone. I think I have resolved this issue myself.
All I had to do was to calculate the position of the IFrame window and minus it from the top scroll value calculated by the drag & drop js code.
I have one third party Popup to display message. It has two properties OffsetX and OffsetY. To set its position in browser.
Now i am invoking this Popup on Button Click event. I need this popup just next to my Button and for that i have to set above mentioned OffsetX and OffsetY properties of Popup.
I tried following code on Button's Click Event,
Popup.OffsetX = Button.Style.Item("Top")
Popup.OffsetY = Button.Style.Item("Left")
But values of Button.Style.Item("Top") and Button.Style.Item("Left") are always nothing and Popup always appear in Left Bottom corner due to value = nothing.
FYI, I did not set Top and Left from CSS. I just dragged the button from tool box.
The values of "Top" and "Left", unless explicitly defined in the CSS, won't be defined. Dragging controls onto the designer won't do that as the Top/Left positions can vary depending on the browser, the end users screen resolution (whether elements get re-positioned due to the width of the screen) and a number of other factors.
You'll probably need, from the sounds of it, to use a bit of client side javascript (if possible) to trigger the pop-up being shown and/or setting its Top and Left properties.