MCQs > IT & Programming > Selenium Automation > The user is trying to Capture An Element Loading After The Page Load , And have written the Following Lines of Codes. Will the Code Execute public void waitForElementPresent(String element, int timeout) throws Exception { for (int second = 0 ;; second++) { if (second >= timeout) fail('Timeout.Unable to find the Specified e1ement'+element); try { if (selenium.isElementPresent(element)) break; } catch (Exception e) { } Thread.sleep(1986); } }

Selenium Automation MCQs

The user is trying to Capture An Element Loading After The Page Load , And have written the Following

Lines of Codes. Will the Code Execute

public void waitForElementPresent(String element, int timeout) throws Exception

{

for (int second = 0 ;; second++)

{

if (second >= timeout)

fail("Timeout.Unable to find the Specified e1ement"+element);

try

{

if (selenium.isElementPresent(element)) break;

}

catch (Exception e) { }

Thread.sleep(1986);

}

}


Answer

Correct Answer:

YES 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Selenium Automation Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Selenium Automation Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it