I am in the process creating a test on the page linked below. However I am having trouble being able to click on the first icon "1-2 Bedroom House". If anyone has any ideas on how to use Selenium C# to select any of the icons on this page, then I can use that same method for all of them.
Thanks in advance.
https://www.estatesales.net/companies/request?returnUrl=%2Fcompanies
I have tried a few ways, but still nothing is working.
driver.FindElement(By.ClassName("es-icon-home")).Click();
driver.FindElement(By.XPath("//div[text()='1-2 Bedroom House']"));
driver.FindElement(By.XPath("//es-icon[contains(#aria-label, '1-2 Bedroom House')]")).Click();
Related
Hi I am currently creating a C# windows program and I am trying to add a right-click menu to the desktop everything is being added to the registry correctly but when I right click the desktop it wont display all menu items on some, its like it has a limit on how many items are aloud is their a way to overcome this? BTW I am adding it all through RegistryKey.
here are some images of the problem...
as you can see it shows three Items but their should be more...
this one shows missing items in the third item
this is a pic of the registry items
any help on this matter will be appreciated, also I have tried to use sharpshell but have failed to get that working, I have limited knowledge of C# but I am learning and have not worked with C++.
I am currently working on an automation project.
Mainly everything is coded in powershell as the project involve AD, Exchange etc.
Last part involves integration to a website to fill a form. I have used document.getElementByID() and everything is working perfectly, but when I click the last button: Approve a popup shows up:
Window text: Message from webpage
Text: Are you sure?
Buttons: OK, Cancel
My question is, how can I answer a Messagebox generated by website?
I've looked through the DOM Explorer but can only find the Approve button, no child elements or anything.
Any help would be appreciated.
thanks DavidG, i figured it was all i java.
Found my way through the code and got i all working by simply ignoring the popup message and go directly to next step.
I am attempting to create a 'find on page' search option for a wp7 webbrowser control named 'TheBrowser' (using the standard webbrowser control in Visual Studio). I have done a lot of research but have not found much in the way of an example or sample where this was implemented. Essentially I will just be activating the search on a click event, from a textbox where the user may type in a word to search in the current webpage. I would also like to highlight the matched words as seen when doing a find on page search on a desktop browser.
I believe that to create this 'find on page' option I should use javascript to search through the lines of text, and then somehow highlight matched words. I have already implemented forward, back, and refresh buttons using TheBrowser.InvokeScript, but I do not know how to format for searching through the entire webpage (I have never done anything like this before). Any advice or assistance would be greatly appreciated, including code samples as I am completely new to this subject! Thanks in advance for your help and hard work!
Try jquery, this should do the trick: http://hugoware.net/blog/more-jquery-magic-search-highlighting You'll just need to inject the jquery script into the page.
I've a very specific question:
How can I click in certain buttons on a web page?
Without that thing of coordinates. =D
What I really want, is a script that search for a Button (or more) with specific name and clicks it.
Imagine:
You open your browser and go to google page, than you run the script and, for example, it clicks the Search button.
If possible, I want a answer wich uses java or C#.
Thanks in advance for reading this,
and sorry for my bad english.
Edit:
Ok. Assuming that I'll use WatiN, can you rapidly explain how do I "put" this on my c# prog?
I want WatiN to be running on a button_click event. Like: When you enter the URL on my prog and press "OK" the prog will click that especific button that I've told you before.
Sorry if I've messed it up, I'me a truly noob with great ideas =s
For .NET, WatiN will do what you want. In fact, the very first example on the home page, shows you how to search google.
I WatiN all the time for screen scraping web sites: http://watin.sourceforge.net/
So i created a web site a long time ago using a designer alot like frontpage + expression design put together, and since then Ive gotten more into coding, and I'm learning html, CSS, and all that good stuff.. and i have this re-designed header that Ive made here:
http://prntscr.com/8zct
So what I need to know, is how i can get it so that when a user clicks on one of the links in the header design it will redirect to a page. and also if possible, how to make it so when a user hovers over a link a drop down may appear with other options, EDIT: I'd like to be able to add a backround image to the drop down navigation menu
As me being quite new to this sort of stuff, could anybody help me achieve this?
PS. I'm working in Visual Studio with ASP. but that doesn't change anything about the html and css stuff. just letting you guys know.
To navigate based on clicks on certain areas of an image, read about image maps.
To create menus and other active components, read about JavaScript (also recommended: jQuery).
You can also create divs that are clickable to use as hot spots on an image. that way you could add a background image to that div if ti's hovered/clicked, whereas image maps does not afford you that opportunity.