I found a StackOverflow question that is similar to yours and I think it might help you out even though we do not have all the HTML.

 = driver.findElement(By.("//[@id="appview"]/div[5]/div/div[2]/div[2]/div[2]/span[1]/i"));

you are missing the Tag Declaration before specifying the id (Please Refer to this Answer)

Your XPath should look like this, you can also use single quotes instead of escaping doubles

element = driver.findElement(By.xpath("//*[@id='appview']/div[5]/div/div[2]/div[2]/div[2]/span[1]/i"));

although, you should know the tagname of the element with the id='appview' and that is what should be in the XPath instead of the * wildcard, because it is not just any element.

there should be only a single element with each unique ID.(theoretically)

Source link https://sqa.stackexchange.com/questions/32236/-to--element-for-a--in---through--webd


Please enter your comment!
Please enter your name here