TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
william king
NA
2
3k
select a random link from google
Oct 23 2013 8:34 PM
I Have an application that has a text box and a button and when you click the button it open up Ie and Google and searches for what was typed into the text box. but i need it to than select a random link from the generated results every time. Anyone know how to do this? Here is the code i have so far
namespace Search
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Btn_Click(object sender, RoutedEventArgs e)
{
using (var browser = new IE("http://www.google.com"))
{
browser.TextField(Find.ByName("q")).TypeText(_textBox.Text);
browser.Button(Find.ByName("btnG")).Click();
browser.WaitForComplete(5000);
System.Windows.Forms.SendKeys.SendWait("{Enter}"); // presses search on the second screen
browser.Button(Find.ById("gbqfb")/*.ByName("btnG")*/).Click(); // doesn't work
}
}
}
}
Reply
Answers (
1
)
load report failed error in wpf.
how 2 add a movable vertical line in a graph of xy axis wpf