I know this has been asked many times, I apologize for that. but i couldn't solve the problem.
I need to export data from excel to chrome web page. but when I press a button on the web page, the small screen opens and I can't find what I'm looking for there.
to be more specific, this is the page I opened. here I click on the button marked red.
enter image description here
A screen like this opens. I need to add data here.
enter image description here
my selenium code is like this.
Public Function kursiyergiris()
Dim tc As Integer
Dim Findby As New Selenium.By
Dim tcekle As Selenium.WebElement
bot.SwitchToNextWindow
Set tcekle = FindElementById("txtTCKimlikNo") // the part where i got the error
tcekle.SendKeys ("12345678")
note: when I search, I can see the "txtTCIDID" part.
thank you for the help.
1: https://i.stack.imgur.com/SXE4T.png
2: https://i.stack.imgur.com/SjnPb.png
Actually "bot.SwitchToNextWindow" is not for the mini window in the 2nd picture. for another window, the login screen. The screen that opens does not have a name. div has name. With the code "Debug.Print bot.IsElementPresent(Findby.ID("RadWindowWrapper_ctl03"))" I can see the div. but I need to write "txtTCIDID" in it.
The 1st photo below is the main screen. The screen where I want to save the second photo. Could you please review it.
enter image description here
enter image description here
It could be that the code bot.SwitchToNextWindow is not switching to the popup window.
Can you replace that code with bot.SwitchToWindowByTitle "{title of the popup window}" and see if that works?
Related
Apologizes for the daft question, but really need some assistance
I have recently started to learn python and found some useful tips online:
on how to populate an ID into a field (reference field)
Select a "firms" = true
and also click "search"
Code Snippet below
driver.find_element(By.XPATH,'//*[#id="search-form-search-section-main-input"]').send_keys(cid)
button1 = driver.find_element(By.XPATH,'//*[#id="search-form-search-options-radio-group"]/span[1]/label/span[1]')
button1.click()
button = driver.find_element(By.XPATH,'//*[#id="search-form-form"]/div[2]/div[2]/div[2]/button')
button.click()
print('Search Result Returned')
These values are being passed in the screen shot below;
[
However i am stuck on the next sequential step.
Once all the steps above are completed, it takes me to the following URL: https://register.fca.org.uk/s/search?q=309238&type=Companies
What i would like to do is click on the tile, so that the next page can load (where I can scrape data)
NB : Regardless of where you tick on the tile it takes you you to another page. ( I assume the it’s a hyperlink)
Whilst viewing that page in chrome it appear that this is the section that refers to that "Title"
and the xpath way is //*[#id="firm-result-card-0"]/div/div[1]
However i tried to reference that in my code, and keep getting errors.
I am facing one simple problem-- there is one Add button in the web page, After clicking that a small pop up window (Not in another browser tab , without title) opened having 3 text box. These id/xpath is getting changed whenever will click on Add button. I need to to enter few data and then save.
Could you please help me how we can handle this dynamic xpath/id ---text box in robot selenium framework. Is there any way we can input on text box based on label. Please share any pointer or sample code.
Thank you very much for the help.
I want to fill in a form in VBA. I can fill everything empty field and set the drop down menus. However I couldn't find a way to put a file in the browse button.
The code for this button is:
I tried something like this
IE.Document.getElementById("browseFiles").Value = "C:\Users\nx\Documents\BCAM development.docx"
or
IE.Document.getElementById("fileElement").Value = "C:\Users\nx\Documents\BCAM development.docx"
As expected it didn't work even though it doesn't give me any error.
Do you know if it is possible to transfer a file like this?
Thank you in advance!
I use VC and I'd like to load a bitmap file on my user Dialogue.
But when I choose the picture item and add it into my Dialogue.
I found that the picture item can't be access by its property.
I can only show the bitmap by adding a bitmap item and I
can not use the picture item. why? Could have anyone else tell me
how to enable the picture item in my Dialogue , so that I can edit
the picture item 's property??
Lovely everybody, I found my soloution, And Now I
can show different Bitmap in my Dialogue without
use any source code.
Here is the Website that I found the problem:
http://www.functionx.com/visualc/applications/displaybitmap.htm
Hope it help
I am trying to work with mouseover on a particular Item in my application by using the following command
{
ie.text_field(:xpath, "//a[contains(text(),'Deal')]").fire_event('onmouseover')
}
On doing mouseover on a item, two subitems are displayed.
Is there any way to capture the sub items which are part of the Item by doing mouseover with which we can report that our test is pass or fail.
Please suggest.
Additional Information :
If we take example,On the StackOver flow page, If i do mouseover on my name, i get a window where i see activity, privileges, Logout and other stuff. This is really what i was looking for. Is there a way to capture the items displayed on the window on doing mouseover.
I also tried to capture the subitems with the following :
{
text=ie.text_field(:xpath, "//a[contains(text(),'Deal')]").fire_event('onmouseover')
puts(text.inspect)
}
On doing this "text" value is displayed as 'nil'.
My general tactic for such things is a combination of using IRB and the IE Developer tool, or Firebug.
using IRB, type out (or cut and paste) the watir statement to fire the onmouseover command to the proper element on the page.
Then have the developer tool rescan the DOM (there's a little refresh icon you can click) The use the tool to point to an element to point to one of the items in the stuff exposed by the onmouseover. Using the info from that, you can then figure out how to address those elements to get the text from the proper div, etc.
If I do that here to the info that opens up when I float the mouse over my name I can find out that it is a table of class "profile-recent-summary" Furthermore I can then look at the way the table is made up and see for example that the 'today' reputation value is in the second cell on that row.. The row also has the text 'reputation' in it.. so
browser.table(:class, 'profile-recent-summary').row(:text, /reputation/).cell(:index, 2).flash
Should flash the cell I want (index might be 1 if using firewatir or webdriver) I can then replace the .flash with something else like .text if I want to get the text from that cell (which is actually inside a link that sits in the cell)..
without seeing your code, I would 'inspect' the element that you are trying to verify and when_present (text) assert that its true