self.click_element(<selectorn>)
self.execute_javascript('window.scrollBy(0,200)')
Ugh
The problem is purely selenium related and has not anything to do with the Robot Framework. Also, usually, scrolling does not work, because selenium will automatically scroll the element to the visible area in the browser. But if you have ribbon in the page, which is hidden when scroll is performed, a small scroll could help.
The stack trace is very small and leaves out vital information, but it seems that you are using Firefox. Have you tried with older versions of Firefox, the latest support version (before x-mas) by selenium was 38. Also try with chrome too, just to see is it a Firefox related problem.
Your code snippet is quite small, but I am assuming that the `click_element ` function does search the element and then does something like this: element.click(). The problem boils down to two things.
1) How do you search the element? Do you get a list of elements or a single element? If you get a list of elements, does the list contain one or more elements?
2) Are you sure that selector is correct? Which means, the selector is unique for that page? And you are sure that the correct page is visible, before you call the `click_element ` with your selector.
As a site note, is there a reason why you are not using Selenium2Library?
-Tatu
Send from my mobile
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
"<selector>":"id=some_element_ID",
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
Ugh
I use Click Element keyword many times in my tests and selenium does always perform scrolling. But I use the Firefox version which is supported by selenium and last I did check, the supported version is 38. Which Firefox version you are using? Also trying with Chrome, to rule out Firefox specific issues, is good practice.
-Tatu
Send from my mobile
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
Ugh
I use Click Element keyword many times in my tests and selenium does always perform scrolling. But I use the Firefox version which is supported by selenium and last I did check, the supported version is 38. Which Firefox version you are using? Also trying with Chrome, to rule out Firefox specific issues, is good practice.
-Tatu
Send from my mobile
On 8 Jan 2016 12:31 p.m., "Adam Matłacz" <amat...@gmail.com> wrote:
I'm using Selenium2Library plus PageObjects. I'm first building library of key words with selectors and base on this I create TC and TS.1. To search for element I use selectors. I use 3 types of selectors:- select item by ID- select item by CSS selector- select item by xpathFirst in the class I define list of selectors of items on the form. Then I use Selenium2Library to perform actions on this elements - i.e. click_element = from Click Element Selenium2Library.In this case"<selector>":"id=some_element_ID",If this element is "visible" then this works smooth. But if the element is "down" on the webpage and is not "visible" on the screen, then I have error. I heard fev times, that Selenium scrolls to the element automatically and it does for some methods. For example when i use:self.input_text("<selector>", <imput_value>)Selenium finds element and scrolls automatically. But this seems to not work with method Click Element! :(2. Yes, the selector is correct. Because:- I first test my selectors with firepath for firefox add on- When I scroll down by javascript, then Click Element with my selector - it works fine. But as I said - this is crappy solution. If element will be moved to the different place on the page, my tests will break.Full stack trace:"ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted withStacktrace:
at fxdriver.preconditions.visible (file:///.../webdriver-py-profilecopy/extensions/fxdriver...@googlecode.com/component
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.