Solved

Why did you delete the script showing the code after you prepend the var?

Posted on 2016-08-24
3
65 Views
Last Modified: 2016-08-30
0
Comment
Question by:zubair k
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
Craig Kehler earned 500 total points
ID: 41770572
Hello,

The script that was working at one point in time is still in the article. But we modified our site and the selectors no longer work.

Here is another quick sample script that should validate in New Relic. Hopefully it will help you get started.

var By = $driver.By;
var driver = $browser;

driver.get("http://www.experts-exchange.com");
driver.findElement(By.id("searchFormFiltered-compForm-searchTerms")).click();
driver.findElement(By.id("searchFormFiltered-compForm-searchTerms")).clear();
driver.findElement(By.id("searchFormFiltered-compForm-searchTerms")).sendKeys("new relic");
driver.findElement(By.name("searchSubmit")).click();

Open in new window


This is the old code, still in the article.
var By = $driver.By;
var driver = $browser;

driver.get("http://www.experts-exchange.com");
driver.findElement(By.css("div.row-content.first > a.button.confirm > span")).click();
driver.findElement(By.css("a.button.confirm > span")).click();
driver.findElement(By.xpath("//div[@id='asId-menu1']/ul/li/a")).click();
driver.findElement(By.linkText("Cloud Computing")).click();
driver.findElement(By.css("a[title=\"AWS\"] > input[name=\"taHolder\"]")).click();
driver.findElement(By.id("searchFormSimple-form-searchTerms")).clear();
driver.findElement(By.id("searchFormSimple-form-searchTerms")).sendKeys("amazon");
driver.findElement(By.css("#searchFormSimple-form > p.buttons > button[name=\"searchSubmit\"]")).click();

Open in new window


Looks like I need to go back and update my article.
0
 
LVL 6

Expert Comment

by:Craig Kehler
ID: 41772052
This is the question I helped you with.
0
 

Author Comment

by:zubair k
ID: 41772055
I wish not to delete this i have made a mistake i have posted the question twice. I deleted the wrong one
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Join & Write a Comment

Suggested Solutions

For some reason Google Apps has decided to reserve 'www' for your new domain which results in an error when trying to map the web address 'www' to a certain site in your Google Sites. The error is 'this address is already being used' and after some …
These instructions are based on installing Owncloud on your new raspberry pi connected with a usb HDD. What do you need Part A? A Raspberry Pi, model B. A boot SD card for the Raspberry Pi. A usb HDD An Ethernet cable to connect to the lo…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now