Part 17
78 : What Is the syntax to get value from text box and store It In variable.
Answer : Most of the time, String In text box will be stored as value. So we need to access value attribute(getAttribute) of that text box as shown In bellow example.
String Result = driver.findElement(By.xpath("//input[@id='Resultbox']")).getAttribute("value");
VIEW PRACTICAL EXAMPLE to get text from calc result text box.
79 : What Is the difference between findelement and findElements ?
Answer : findElement Is useful to locate and return single element from page of software web application while findElements Is useful to locate and return multiple elements from software web page.
80 : Tell me looks like XPath of sibling Input element which Is after Div in the DOM.
Answer : XPath for above scenario will be something like bellow.
//div/following-sibling::input
81 : Tell me looks like CSSSelector path of sibling Input element which Is after Div in the DOM.
Answer : CSSSelecor path will looks like bellow.
css=div + input
82 : What Is Parallelism In TestNG?
Answer : In general software term, Parallelism means executing two part of software program simultaneously or executing software program simultaneously or we can say multithreaded or parallel mode. TestNG has same feature using which we can start multiple threads simultaneously In parallel mode and test methods will be executed In them. VIEW PARALLELISM EXAMPLE.
It’s a very useful & qualitative information shared.
ReplyDeleteNice share.
- Software Testing Services