2
Answers

How to create instance of class from string?

Photo of robwhitby78

robwhitby78

20y
1.8k
1
Hi, I have a string which contains the namespace and name of a class... eg. "MyProject.Classes.MyClass"; I need to create an instance of this class. Normally would do like this: Object obj = new MyProject.Classes.MyClass(); But how do I create it from the string instead? Is it even possible?? Thanks! M

Answers (2)

0
Photo of Laxmidhar Sahoo
NA 2.3k 1.4k 7y
sir I think 
 
driver.get('URL');
 
The above get method use the url as a variable where u use as a text constant.
 
The datails is not displayed