I am using bokeh dropdowns, but the html page doesn't take up the whole screen, rendering the dropdown unusable. Is there a fix for this?
HTML doesn't go down far enough:
After clicking the dropdown, you can't select options 2 or 3:
Delete the None, in your menu (line 6), then you will see the list of items.
Related
is there a way to interact with invisible popups/elements in selenium using python ?
by invisible or hidden , i do not mean the elements with attribute hidden , neither do i mean that these elements are invisible from the user.
these invisible elements are those that do not appear in the inspect element section
for example: on a webapp screen where right click opens up a small options window which which has different options related to that webapp and its not the traditional browser right click options popup
by default this options popup does not appear in the inspect element , and it only appears when user right clicks on a certain section of the screen, the contents of this options popup differs depending on which setion of the screen the right click was performed on, and it disappears as soon as another click happens anywhere , even if i click on the inspect element section the options popup will disappear.
is there any way to deal with this sort of popup?
Edit 1: when i right click on the screen while the inspect element option is selected something related to the right click popup appears in the inspect element window , but as soon as i click on it to see the element ids , it disappears from the inspect element window
To search xpath of such dynamic elements use DOM break points:
And select break on subtree modification. Now all changes will break and pause the webpage rendering
Click resume execution or press f8 till your pop gets displayed
I am trying to click on the 'details' button on https://www.rogers.com/web/totes/wireless/choose-phone. However it seems as though I cant click it. The page seems to be dynamic and so the link does not change.
I have tried selecting the button by link but only to realise it stays on the same link regardless if that button is click. There are 66 elements under the 'details' button when there should only be 32. Therefore when I try selecting any from that list of elements, none work.
phoneDetailsPath = wait.until(EC.presence_of_all_elements_located((By.CSS_SELECTOR, '.select-font.ng-scope')))
phoneDetailsPath[num].click()
I am hoping to be able to store all the 'details' paths into a list and click the button at that index.
In case it helps you can use selector
[ng-click*=gotoDeviceConfigure]
Automationists won't like using javascript but you can execute click as follows:
#first item
driver.execute_script('document.querySelector("[ng-click*=gotoDeviceConfigure]").click();')
# using indices
driver.execute_script('document.querySelectorAll("[ng-click*=gotoDeviceConfigure]")[1].click();')
However, you need to scroll later elements into view and you need to handle dimissing pop-ups about being signed up unless already logged in (I guess).
This is my first post so bear with me. I'm trying to go into a dropdown list (Products) that is located in a toolbar at the top of the webpage. Once hovering over the dropdown Products, I'd like to click the one that is named ModMaster so I can navigate to the link 'https://www.modmaster.com'. How do I go about doing this?
I've tried several different methods but the core issue is that's unable to locate the element. If I explicitly wait for it to be visible, it times out.
I've tried using Select, javascript execute, simple find_by_element.click to no avail.
Really the end result just needs to be the current webpage needs to change into www.modmaster.com and keep me logged in. I appreciate any help!
Here is the HTML:
`<ul class="topbar-module-wrap"><li class="topbar-module"><div class="login-info dropdown"><span>Welcome, hidden</span><ul class="dropdown-menu"><li><label>User name:</label> hidden</li><li><label>Agency:</label> hidden</li><li class="divider"></li><li>Log out</li></ul></div></li><li class="topbar-module"><div id="product-dropdown" class="product-menu dropdown"><i class="icon-menu-white-small"></i><span>Products</span><ul class="dropdown-menu"><li><div class="topbar-product-name">Account Management Center</div><div class="topbar-product-subtext"></div></li><li><div class="topbar-product-name">Broker Briefcase®</div><div class="topbar-product-subtext">Sales and Marketing Platform</div></li><li><a href="https://www.modmaster.com/" target="_blank"><div class="topbar-product-name">ModMaster®</div><div class="topbar-product-subtext">Mod Analysis Tool
I'm writing some automated GUI testing with selenium (Python binding + Firefox driver). On this page we're having problem with, there is button that I want to click but it's at the lower part of the page (I'm selecting the button via id). The default size of the Firefox window isn't large enough to show it. So the actual clicked element is one from the tab bar which is always visible.
If I manually resize the window during the test, it runs smoothly.
This looks like a bug to me TBH. I'm wondering if this is a known feature and a work around exists.
You can use Actions Chains to scroll to the element
actions = ActionChains(driver)
actions.move_to_element(element).perform()
That will make the button visible and you will be able to click on it. You can also use explicit wait to make sure the button is visible.
You can call location_once_scrolled_into_view on the element. It is a property that returns the elements location, but it has the added side-effect of scrolling to the element first if it is not in view already.
element.location_once_scrolled_into_view.
I am testing tooltips on my web page using Selenium WebDriver with Firefox.
I'm trying to hover over the element that has the tooltip attached. To test that the tooltip is displayed and then to hover over another element and test its respective tooltip.
element_to_click = claim_section.find_element_by_class_name("arrowBox")
hover_mouse = ActionChains(self.driver).move_to_element(element_to_click)
hover_mouse.perform()
At any given time, we see only one tooltip when I test it manually. But when I run this test the first tooltip does not hide. I tried to move over another element on the page but the tooltip remains visible.
Am I missing any other action here and what are the possible solutions?
If you have multiple tooltips make sure that you don't reuse the same ActionChains object.
I loop over my tooltips like so:
for element in elements:
ActionChains(self.driver).move_to_element(element).perform()