Mouse over and click issue

Hi,

Unable to click on myprofile in myntra.com.

Steps: Login to myntra.com and mouse over my myntra and click my profile.

Note: I was unable to upload image, getting security issue.

  1. WebElement element = driver.findElement(By.linkText(“My Myntra”));
  2. Actions action = new Actions(driver);
  3. action.moveToElement(element).build().perform();
  4. driver.findElement(By.linkText(“View My Profile”)).click();
  5. Log.info(“Mouse-Overed On MyProfile and clicked on is View My Profile”);
  6. }catch (Exception e){
  7. Log.error(“==> Not Mouse-Overed On MyProfile and clicked on is View My Profile”);
  8. throw(e);
  9. }
Selenium Train Asked on December 12, 2014 in Selenium WebDriver.
Add Comment
1 Answer(s)

I am Newbie here ..  Wanted to try the answer for the question u asked..

Yes , by using linkTest its not working.

But using partialLinkTest its working.

WebElement element = driver.findElement(By.linkText(“My Myntra”));
Actions action = new Actions(driver);
action.moveToElement(element).build().perform();
Thread.sleep(3000);
WebElement element1 = driver.findElement(By.partialLinkText(“MY“));

or can use any name part —-WebElement element1 = driver.findElement(By.partialLinkText(“name part above VIEW MY PROFILE”));
action.moveToElement(element1).perform();
element1.click();

Can any1 else here let us know why linkTest not picking the exact words?

grajesh83 Default Answered on December 13, 2014.

Rajesh,

Thanks to you, but it’s not working for me — Tested on FF and Chrome browsers.

on December 14, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.