i am trying to inspect an element . When i right click and inspect that element i see the below things
I tried below but it didn't worked for me
driver.findElement(By.id("tmsMobileId")).click();
Can someone please help me here.
i am trying to inspect an element . When i right click and inspect that element i see the below things
I tried below but it didn't worked for me
driver.findElement(By.id("tmsMobileId")).click();
Can someone please help me here.
It's possible the web page is not loading completely when the click() executes, so it won't be able to find what it is supposed to click on. You may need to sleep the script for a couple seconds.
Otherwise, take a look at this link:
How to click an element in Selenium WebDriver using JavaScript