data driven in selenium

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

data driven in selenium

sreedevivasudevan91
List<WebElement> category = driver.findElements(By.xpath(""));
         List<String> categoryTexts = new ArrayList<String>();
    for (int j=0;j<category.size(); j++)
    {
      //driver.findElement(By.xpath("")).click();
    // WebElement element = driver.findElement(By.xpath(""));
    // Thread.sleep(3000);
    WebElement e = driver.findElement(By.xpath(""));

       boolean actualValue = e.isDisplayed();
       if (actualValue)
           System.out.println("Button is displayed");
       e.click();
    category.get(j).click();

Here i want 3 solution:
1 how to print this category
2.how to export this into excel sheet
3.these are keywords of image and after printing all keywords of image ,it will go to another image and print keywords:-so how to print keywords of a image seperated by comma then print another keywords of other image(this image is taken from excel)



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/5145f0c3-73b5-4a81-ad7b-deea013df559%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: data driven in selenium

sreedevivasudevan91
please reply

On Friday, June 15, 2018 at 8:02:22 PM UTC+5:30, [hidden email] wrote:
List<WebElement> category = driver.findElements(By.xpath(""));
         List<String> categoryTexts = new ArrayList<String>();
    for (int j=0;j<category.size(); j++)
    {
      //driver.findElement(By.xpath("")).click();
    // WebElement element = driver.findElement(By.xpath(""));
    // Thread.sleep(3000);
    WebElement e = driver.findElement(By.xpath(""));

       boolean actualValue = e.isDisplayed();
       if (actualValue)
           System.out.println("Button is displayed");
       e.click();
    category.get(j).click();

Here i want 3 solution:
1 how to print this category
2.how to export this into excel sheet
3.these are keywords of image and after printing all keywords of image ,it will go to another image and print keywords:-so how to print keywords of a image seperated by comma then print another keywords of other image(this image is taken from excel)



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f469804c-340c-42dc-b057-3c659899d7df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: data driven in selenium

total QA
Hi Sreedevi,

The text available in the category webelement is printed using getText() available.

So,please call category.get(j).getText() to retrieve the text stored in the webelement.

Regards,
total-qa.com

On Friday, June 15, 2018 at 8:04:14 PM UTC+5:30, [hidden email] wrote:
please reply

On Friday, June 15, 2018 at 8:02:22 PM UTC+5:30, [hidden email] wrote:
List<WebElement> category = driver.findElements(By.xpath(""));
         List<String> categoryTexts = new ArrayList<String>();
    for (int j=0;j<category.size(); j++)
    {
      //driver.findElement(By.xpath("")).click();
    // WebElement element = driver.findElement(By.xpath(""));
    // Thread.sleep(3000);
    WebElement e = driver.findElement(By.xpath(""));

       boolean actualValue = e.isDisplayed();
       if (actualValue)
           System.out.println("Button is displayed");
       e.click();
    category.get(j).click();

Here i want 3 solution:
1 how to print this category
2.how to export this into excel sheet
3.these are keywords of image and after printing all keywords of image ,it will go to another image and print keywords:-so how to print keywords of a image seperated by comma then print another keywords of other image(this image is taken from excel)



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b8782bd7-0a03-48de-be91-b78954562cfa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.