unable to fetch text from the modal dialog using getText() method before accepting the alert - selenium

On clicking this link in the image shared, a modal pop up window opens which i am able to switch to click the OK button but cannot fetch the text present in it. The modal dialog is shared in the screenshot and has no html tags hence i cannot locate
the text in it using any locator.
I tried using driver.switchTo().alert().getText() to fetch the text present in it.

Related

robotframework- unable to click a button on a modal dialogue box

when I open a particular webpage it has a EULA form that appears on top of the home page in the form of a modal in HTML/CSS. I have tried the XPath of the accept button but it says element not found also tried using handle alert.
is there a unique way to handle a dialogue box in robotframework?
image of HTML in inspect view
SeleniumLibrary.Set Focus To Element ${button_on_popup_page}
SeleniumLibrary.Click Element ${button_on_popup_page}
I figured it out, shown in the above code. I first set focus to the button and then used the click element. This seemed to work.

Selenium: How to get text without clicking on tab?

I'm trying to find text that is located on a specific tab. For some reason the text is available in the html but when I use the command driver.find_element_by_id('hand-graph-title-overview').text without clicking on the 'Overview' tab it returns a empty string. However, when I do click on the 'Overview' tab it will return 'Unpaired OOP' successfully. Does anyone know how to get the text without clicking on the tab?
Images of what I'm trying to scrape.
https://i.stack.imgur.com/9nSc0.png
https://i.stack.imgur.com/MyvDA.png
Maybe try and get the 'value' attribute of the element.
driver.find_element_by_id('hand-graph-title-overview').get_attribute('value')
The answer is no. You can't access the element from the other tab without focusing on it. Retrieval of text is totally based on the presence of the element on the current page. When you click on tab then automatically it gets loaded in the dom and then only you can access the element.

How to click on dropdown list items through Selenium in VBA macro?

I am trying to create a macro to download a file from a web page. I have coded the login and navigating to main download page however, unable to get codes to click on a drop-down menu on a web page. I need to click on 3 dots then click on Download xlsx to start downloading the file. I can not proceed to rest of the codes until file is downloaded. Here is the link to HTML properties of this dropdownlist
obj.FindElementsByClass("ant-dropdown-menu-item").Click
I had figured out the solution. I had to click on the blank space to get that drop down buttons appear. Then clicked as usually. I got the element path form Chropath chrome add on and used xpath.
Obj.FindElementByClass("insight__header").Click '-----------This clicks on blank space to show 3 dots.
Obj.FindElementByXPath("/html[1]/body[1]/div[1]/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/header[1]/span[2]/div[1]/button[1]/i[1]/*").Click '---------This cicks on 3 dots and displays the menu.
Obj.FindElementByXPath("/html[1]/body[1]/div[1]/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[3]/div[1]/div[1]/ul[1]/li[4]/span[1]").Click '---------This clicks on Download xlxs button to start downloading the file.

I have to maxmimize the child page minimized when it double clicked on its parent page. Is this possible to work in webform in vb.net

I had a page with gridview when clicking on the hyperlink in the cell it will open a popup window.
When this popup is minimized I was not able to click anything on the parent page so I need when I double click of mouse on parent page I want this popup to be maximized. And I was not even able to open new tab also when popup is minimized .so new tab also have to be opened when popup is minimized I dont want to use any extra buttons in my design.

Selenium ClickandWait

Using id=incidentsCheckBox gets me an error but when clicking manually it shows up fine. What is the best way of capturing dynamically generated icons (incidentIcons), which pop up when a checkbox is clicked, which if click individually will show a popup data of status?