Miscellaneous Questions

  1. Broken links p

2. Page Object and Page Factory with test ng 

3. Diff between 401 adn 403

4. How to use oath authentication?https://reqres.in/api/users/2 its get request. 

5. How to use oath authentication in header

6. You have a josn file "./resoureces/sample.josn"

   Write down the code to convert this json to xml

7. How to download webdriver executables automatically?

8. print all the key values from the .properties file?

9. https://expired.badssl.com/ handle this error in chrome

10.Sesond largest number in an array

11.Reverse a string without using function

12. How to sort hashmap?

13. Write DataProiver in test ng class that provides data to both the test cases add and substract

14. Xpath of vegetable image from Image

    (//*[@class='item prod-deck ng-scope'])[2]//img


http://demo.guru99.com/test/guru99home/


15.How to override the tagged tests of cucumber using maven

   mvn test -DCucumer.Options="--tags @TagName"

16. What is the difference between Hooks and Background. Can we use both?

17. When User entered the below information in the feedback form

|Rahul|23years|


|M.Sc|Anna University|

18. How to handle

https://the-internet.herokuapp.com/basic_auth

driver.get("https://username:password@dreamshop.honda.com/s")

19. http://demo.guru99.com/test/newtours/register.php

    Select "INDIA" from the Country drop down without using Select class object

List<WebElement> allOptions = driver.findElements(By.xpath("//select[@name='country']//option"));

        System.out.println(allOptions.size());

         

                 

                 

        for(int i = 0; i<=allOptions.size()-1; i++) {

             

             

            if(allOptions.get(i).getText().contains("ANGOLA")) {

                 

                allOptions.get(i).click();

                break;

                 

            }

        }


using select

Select s = new Select(WebElement);

s.selectByIndex(1);

https://www.codegrepper.com/code-examples/python/how+to+handle+dropdown+without+select+in+selenium+python

6) What is the difference between Page Object Model (POM) and Page Factory?


A) Page Object is a class that represents a web page and hold the functionality and members.


Page Factory is a way to initialize the web elements you want to interact with within the page object when you create an instance of it.

Comments

Popular Posts